Having fun with the new forge!
Done in a different branch because of a depreciated api.
This commit is contained in:
parent
b82f79dc04
commit
566430d490
1 changed files with 21 additions and 2 deletions
|
@ -2,6 +2,7 @@ package techreborn;
|
|||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.ProgressManager;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
|
@ -40,49 +41,67 @@ public class Core {
|
|||
@Mod.EventHandler
|
||||
public void preinit(FMLPreInitializationEvent event)
|
||||
{
|
||||
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn preInit", 1);
|
||||
INSTANCE = this;
|
||||
String path = event.getSuggestedConfigurationFile().getAbsolutePath()
|
||||
.replace(ModInfo.MOD_ID, "TechReborn");
|
||||
bar.step("Loading Config");
|
||||
|
||||
config = ConfigTechReborn.initialize(new File(path));
|
||||
LogHelper.info("PreInitialization Compleate");
|
||||
LogHelper.info("PreInitialization Complete");
|
||||
ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn Init", 10);
|
||||
bar.step("Loading Blocks");
|
||||
// Register ModBlocks
|
||||
ModBlocks.init();
|
||||
bar.step("Loading Items");
|
||||
// Register ModItems
|
||||
ModItems.init();
|
||||
bar.step("Loading Recipes");
|
||||
// Recipes
|
||||
ModRecipes.init();
|
||||
bar.step("Loading Compat");
|
||||
// Compat
|
||||
CompatManager.init(event);
|
||||
bar.step("Loading WorldGen");
|
||||
// WorldGen
|
||||
GameRegistry.registerWorldGenerator(new TROreGen(), 0);
|
||||
bar.step("Loading Gui Handler");
|
||||
// Register Gui Handler
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
|
||||
bar.step("Loading Packets");
|
||||
// packets
|
||||
PacketHandler.setChannels(NetworkRegistry.INSTANCE.newChannel(
|
||||
ModInfo.MOD_ID + "_packets", new PacketHandler()));
|
||||
bar.step("Loading Achievements");
|
||||
// Achievements
|
||||
TRAchievements.init();
|
||||
bar.step("Loading Multiblocks");
|
||||
// Multiblock events
|
||||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||
FMLCommonHandler.instance().bus()
|
||||
.register(new MultiblockServerTickHandler());
|
||||
|
||||
bar.step("Loading Client things");
|
||||
proxy.init();
|
||||
|
||||
LogHelper.info("Initialization Compleate");
|
||||
LogHelper.info("Initialization Complete");
|
||||
ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postinit(FMLPostInitializationEvent event)
|
||||
{
|
||||
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn Init", 1);
|
||||
bar.step("Loading Recipes");
|
||||
// Has to be done here as Buildcraft registers there recipes late
|
||||
RecipeManager.init();
|
||||
ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue