Merge remote-tracking branch 'origin/loadingScreen'
Conflicts: src/main/java/techreborn/Core.java
This commit is contained in:
commit
5e20dc8156
1 changed files with 21 additions and 3 deletions
|
@ -3,6 +3,7 @@ package techreborn;
|
|||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
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;
|
||||
|
@ -46,52 +47,70 @@ 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 Complete");
|
||||
ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
ProgressManager.ProgressBar bar = ProgressManager.push("TechReborn Init", 11);
|
||||
bar.step("Loading Blocks");
|
||||
// Register ModBlocks
|
||||
ModBlocks.init();
|
||||
bar.step("Loading Fluids");
|
||||
// Register Fluids
|
||||
ModFluids.init();
|
||||
bar.step("Loading Items");
|
||||
// Register ModItems
|
||||
ModItems.init();
|
||||
bar.step("Loading Recipes");
|
||||
// Recipes
|
||||
ModRecipes.init();
|
||||
bar.step("Loading Client things");
|
||||
//Client only init, needs to be done before parts system
|
||||
proxy.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 Multiblock events");
|
||||
// Multiblock events
|
||||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||
FMLCommonHandler.instance().bus().register(new MultiblockServerTickHandler());
|
||||
|
||||
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();
|
||||
//RecipeHanderer.addOreDicRecipes();
|
||||
LogHelper.info(RecipeHanderer.recipeList.size() + " recipes loaded");
|
||||
ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
|
@ -101,8 +120,7 @@ public class Core {
|
|||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(
|
||||
ConfigChangedEvent.OnConfigChangedEvent cfgChange)
|
||||
{
|
||||
ConfigChangedEvent.OnConfigChangedEvent cfgChange) {
|
||||
if (cfgChange.modID.equals("TechReborn")) {
|
||||
ConfigTechReborn.Configs();
|
||||
|
||||
|
|
Loading…
Reference in a new issue