diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index 9262b5175..4b1ef000b 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -163,6 +163,8 @@ public class FMLClientHandler implements IFMLSidedHandler private OptifineModContainer optifineContainer; + private boolean guiLoaded; + public void onPreLoad(Minecraft minecraft) { client = minecraft; @@ -293,7 +295,7 @@ public class FMLClientHandler implements IFMLSidedHandler loadTextures(fallbackTexturePack); firstTick = false; } - FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLDLOAD,TickType.GUILOAD)); + FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLDLOAD)); } } @@ -304,6 +306,12 @@ public class FMLClientHandler implements IFMLSidedHandler public void onRenderTickEnd(float partialTickTime) { + if (!guiLoaded) + { + FMLCommonHandler.instance().rescheduleTicks(); + FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.GUILOAD), partialTickTime, client.field_6313_p); + guiLoaded = true; + } FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.RENDER,TickType.GUI), partialTickTime, client.field_6313_p); } /** diff --git a/fml/client/net/minecraft/src/BaseMod.java b/fml/client/net/minecraft/src/BaseMod.java index 180123612..45646af2d 100644 --- a/fml/client/net/minecraft/src/BaseMod.java +++ b/fml/client/net/minecraft/src/BaseMod.java @@ -53,7 +53,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod public final boolean doTickInGUI(TickType tick, boolean tickEnd, Object minecraftInstance, Object... data) { Minecraft mc = (Minecraft) minecraftInstance; - if (tickEnd && ( tick==TickType.RENDER || tick==TickType.GAME )) { + if (tickEnd && ( tick==TickType.RENDER || tick==TickType.GAME ) || tick == TickType.GUILOAD) { return onTickInGUI((Float) data[0], mc, mc.field_6313_p); } return true; diff --git a/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java b/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java index bb57909ce..b9bfc5c23 100644 --- a/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java +++ b/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java @@ -43,8 +43,10 @@ public class ModLoaderHelper // If we're enabled but we want clock ticks, or we're server side we get game ticks if (enable && (useClock || FMLCommonHandler.instance().getSide().isServer())) { ticks.add(TickType.GAME); + ticks.add(TickType.WORLDLOAD); } else { ticks.remove(TickType.GAME); + ticks.remove(TickType.WORLDLOAD); } } @@ -55,14 +57,19 @@ public class ModLoaderHelper // If we're enabled and we don't want clock ticks we get render ticks if (enable && !useClock) { ticks.add(TickType.RENDER); + ticks.add(TickType.GUILOAD); } else { ticks.remove(TickType.RENDER); } // If we're enabled but we want clock ticks, or we're server side we get world ticks if (enable && useClock) { ticks.add(TickType.GAME); + ticks.add(TickType.GUILOAD); + ticks.add(TickType.WORLDLOAD); } else { ticks.remove(TickType.GAME); + ticks.remove(TickType.GUILOAD); + ticks.remove(TickType.WORLDLOAD); } }