// @Mod.PreInit public void preInit(FMLPreInitializationEvent e) { serverSide = e.getSide().isServer(); clientSide = e.getSide().isClient(); if (clientSide) { client = initClient(); proxy = client; } cfgFile = e.getSuggestedConfigurationFile(); loadConfig(); boolean[] configMarkers = ReflectionHelper.getPrivateValue(Configuration.class, config, "configMarkers"); preallocateBlockIDs(configMarkers); preallocateItemIDs(configMarkers); if (client != null) client.preInit(e); }
// @Mod.PostInit public void postInit(FMLPostInitializationEvent e) { registerBlocks(); registerItems(); registerOres(); registerRecipes(); registerTileEntities(); registerRandomItems(); registerWorldGenerators(); registerContainers(); registerEntities(); registerVillagers(); registerOther(); if (client != null) client.postInit(e); if (proxy == null) proxy = this; NetworkRegistry.instance().registerGuiHandler(this, proxy); saveConfig(); }
// @Mod.Init public void init(FMLInitializationEvent e) { MinecraftForge.EVENT_BUS.register(this); if (client != null) client.init(e); }