Switch to Forge's DeferredRegister

Well, mostly. We currently don't do recipe serializers as I'm a little
too lazy. For items, blocks and TE types this does make registration
nicer - we've some helper functions which help reduce duplication.

Some types (containers, TEs, etc..) are a little less nice, as we now
must define the registry object (i.e. the WhateverType<?>) in a separate
class to the class it constructs. However, it's probably a worthwhile
price to pay.
This commit is contained in:
SquidDev
2020-06-27 10:23:51 +01:00
parent e4c422d6f9
commit 613a28a5af
66 changed files with 670 additions and 745 deletions
@@ -270,7 +270,7 @@ public final class Config
clientSpec = clientBuilder.build();
}
public static void load()
public static void setup()
{
ModLoadingContext.get().registerConfig( ModConfig.Type.SERVER, serverSpec );
ModLoadingContext.get().registerConfig( ModConfig.Type.CLIENT, clientSpec );