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.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
|
import cpw.mods.fml.common.ProgressManager;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
|
@ -40,49 +41,67 @@ public class Core {
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void preinit(FMLPreInitializationEvent event)
|
public void preinit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn preInit", 1);
|
||||||
INSTANCE = this;
|
INSTANCE = this;
|
||||||
String path = event.getSuggestedConfigurationFile().getAbsolutePath()
|
String path = event.getSuggestedConfigurationFile().getAbsolutePath()
|
||||||
.replace(ModInfo.MOD_ID, "TechReborn");
|
.replace(ModInfo.MOD_ID, "TechReborn");
|
||||||
|
bar.step("Loading Config");
|
||||||
|
|
||||||
config = ConfigTechReborn.initialize(new File(path));
|
config = ConfigTechReborn.initialize(new File(path));
|
||||||
LogHelper.info("PreInitialization Compleate");
|
LogHelper.info("PreInitialization Complete");
|
||||||
|
ProgressManager.pop(bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void init(FMLInitializationEvent event)
|
public void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn Init", 10);
|
||||||
|
bar.step("Loading Blocks");
|
||||||
// Register ModBlocks
|
// Register ModBlocks
|
||||||
ModBlocks.init();
|
ModBlocks.init();
|
||||||
|
bar.step("Loading Items");
|
||||||
// Register ModItems
|
// Register ModItems
|
||||||
ModItems.init();
|
ModItems.init();
|
||||||
|
bar.step("Loading Recipes");
|
||||||
// Recipes
|
// Recipes
|
||||||
ModRecipes.init();
|
ModRecipes.init();
|
||||||
|
bar.step("Loading Compat");
|
||||||
// Compat
|
// Compat
|
||||||
CompatManager.init(event);
|
CompatManager.init(event);
|
||||||
|
bar.step("Loading WorldGen");
|
||||||
// WorldGen
|
// WorldGen
|
||||||
GameRegistry.registerWorldGenerator(new TROreGen(), 0);
|
GameRegistry.registerWorldGenerator(new TROreGen(), 0);
|
||||||
|
bar.step("Loading Gui Handler");
|
||||||
// Register Gui Handler
|
// Register Gui Handler
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
|
||||||
|
bar.step("Loading Packets");
|
||||||
// packets
|
// packets
|
||||||
PacketHandler.setChannels(NetworkRegistry.INSTANCE.newChannel(
|
PacketHandler.setChannels(NetworkRegistry.INSTANCE.newChannel(
|
||||||
ModInfo.MOD_ID + "_packets", new PacketHandler()));
|
ModInfo.MOD_ID + "_packets", new PacketHandler()));
|
||||||
|
bar.step("Loading Achievements");
|
||||||
// Achievements
|
// Achievements
|
||||||
TRAchievements.init();
|
TRAchievements.init();
|
||||||
|
bar.step("Loading Multiblocks");
|
||||||
// Multiblock events
|
// Multiblock events
|
||||||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||||
FMLCommonHandler.instance().bus()
|
FMLCommonHandler.instance().bus()
|
||||||
.register(new MultiblockServerTickHandler());
|
.register(new MultiblockServerTickHandler());
|
||||||
|
|
||||||
|
bar.step("Loading Client things");
|
||||||
proxy.init();
|
proxy.init();
|
||||||
|
|
||||||
LogHelper.info("Initialization Compleate");
|
LogHelper.info("Initialization Complete");
|
||||||
|
ProgressManager.pop(bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void postinit(FMLPostInitializationEvent event)
|
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
|
// Has to be done here as Buildcraft registers there recipes late
|
||||||
RecipeManager.init();
|
RecipeManager.init();
|
||||||
|
ProgressManager.pop(bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue