Move a bunch of registrations to PreInit.
I believe they should be happening there in the first place.
This commit is contained in:
parent
4b75a2f6a2
commit
41cf1a2437
|
@ -1339,43 +1339,24 @@ public class Mekanism
|
||||||
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 20, 0).setUnlocalizedName("infuse.fungi"));
|
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 20, 0).setUnlocalizedName("infuse.fungi"));
|
||||||
InfuseRegistry.registerInfuseType(new InfuseType("BIO", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 12, 0).setUnlocalizedName("infuse.bio"));
|
InfuseRegistry.registerInfuseType(new InfuseType("BIO", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 12, 0).setUnlocalizedName("infuse.bio"));
|
||||||
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 24, 0).setUnlocalizedName("infuse.obsidian"));
|
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 24, 0).setUnlocalizedName("infuse.obsidian"));
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
//Load configuration
|
||||||
public void init(FMLInitializationEvent event)
|
proxy.loadConfiguration();
|
||||||
{
|
|
||||||
//Register the mod's world generators
|
//Register the mod's world generators
|
||||||
GameRegistry.registerWorldGenerator(genHandler, 1);
|
GameRegistry.registerWorldGenerator(genHandler, 1);
|
||||||
|
|
||||||
//Register the mod's GUI handler
|
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new CoreGuiHandler());
|
|
||||||
|
|
||||||
//Register player tracker
|
//Register player tracker
|
||||||
FMLCommonHandler.instance().bus().register(new CommonPlayerTracker());
|
FMLCommonHandler.instance().bus().register(new CommonPlayerTracker());
|
||||||
FMLCommonHandler.instance().bus().register(new CommonPlayerTickHandler());
|
FMLCommonHandler.instance().bus().register(new CommonPlayerTickHandler());
|
||||||
|
|
||||||
//Initialization notification
|
|
||||||
logger.info("Version " + versionNumber + " initializing...");
|
|
||||||
|
|
||||||
//Get data from server.
|
|
||||||
new ThreadGetData();
|
|
||||||
|
|
||||||
//Register to receive subscribed events
|
//Register to receive subscribed events
|
||||||
FMLCommonHandler.instance().bus().register(this);
|
FMLCommonHandler.instance().bus().register(this);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
|
||||||
//Set up VoiceServerManager
|
|
||||||
if(voiceServerEnabled)
|
|
||||||
{
|
|
||||||
voiceManager = new VoiceServerManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Register with TransmitterNetworkRegistry
|
//Register with TransmitterNetworkRegistry
|
||||||
TransmitterNetworkRegistry.initiate();
|
TransmitterNetworkRegistry.initiate();
|
||||||
|
|
||||||
//Load configuration
|
|
||||||
proxy.loadConfiguration();
|
|
||||||
|
|
||||||
//Load this module
|
//Load this module
|
||||||
addItems();
|
addItems();
|
||||||
addBlocks();
|
addBlocks();
|
||||||
|
@ -1386,12 +1367,31 @@ public class Mekanism
|
||||||
|
|
||||||
new MultipartMekanism();
|
new MultipartMekanism();
|
||||||
|
|
||||||
//Packet registrations
|
|
||||||
packetHandler.initialize();
|
|
||||||
|
|
||||||
//Load proxy
|
//Load proxy
|
||||||
proxy.registerRenderInformation();
|
proxy.registerRenderInformation();
|
||||||
proxy.loadUtilities();
|
proxy.loadUtilities();
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void init(FMLInitializationEvent event)
|
||||||
|
{
|
||||||
|
//Register the mod's GUI handler
|
||||||
|
NetworkRegistry.INSTANCE.registerGuiHandler(this, new CoreGuiHandler());
|
||||||
|
|
||||||
|
//Initialization notification
|
||||||
|
logger.info("Version " + versionNumber + " initializing...");
|
||||||
|
|
||||||
|
//Get data from server.
|
||||||
|
new ThreadGetData();
|
||||||
|
|
||||||
|
//Set up VoiceServerManager
|
||||||
|
if(voiceServerEnabled)
|
||||||
|
{
|
||||||
|
voiceManager = new VoiceServerManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Packet registrations
|
||||||
|
packetHandler.initialize();
|
||||||
|
|
||||||
//Completion notification
|
//Completion notification
|
||||||
logger.info("Loading complete.");
|
logger.info("Loading complete.");
|
||||||
|
|
Loading…
Reference in a new issue