diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index 980cde977..38b2010ac 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -301,14 +301,14 @@ public class FMLClientHandler implements IFMLSidedHandler public void onRenderTickStart(float partialTickTime) { - FMLCommonHandler.instance().tickStart(TickType.RENDER, partialTickTime); - FMLCommonHandler.instance().tickStart(TickType.GUI, partialTickTime, client.field_6313_p); + FMLCommonHandler.instance().tickStart(TickType.RENDER, partialTickTime); + FMLCommonHandler.instance().tickStart(TickType.GUI, partialTickTime, client.field_6313_p); } public void onRenderTickEnd(float partialTickTime) { - FMLCommonHandler.instance().tickEnd(TickType.RENDER, partialTickTime); - FMLCommonHandler.instance().tickEnd(TickType.GUI, partialTickTime, client.field_6313_p); + FMLCommonHandler.instance().tickEnd(TickType.RENDER, partialTickTime); + FMLCommonHandler.instance().tickEnd(TickType.GUI, partialTickTime, client.field_6313_p); } /** * Get the server instance diff --git a/fml/client/net/minecraft/src/BaseMod.java b/fml/client/net/minecraft/src/BaseMod.java index 9a1aba2c4..f45fcf586 100644 --- a/fml/client/net/minecraft/src/BaseMod.java +++ b/fml/client/net/minecraft/src/BaseMod.java @@ -42,12 +42,13 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod public final boolean doTickInGame(TickType tick, boolean tickEnd, Object minecraftInstance, Object... data) { Minecraft mc = (Minecraft) minecraftInstance; + boolean hasWorld = mc.field_6324_e != null; // World and render ticks - if ((tickEnd && tick==TickType.WORLD) || (tickEnd && tick==TickType.RENDER)) { + if (((tickEnd && tick==TickType.WORLD) || (tickEnd && tick==TickType.RENDER)) && hasWorld) { return onTickInGame((Float) data[0], mc); } else if (((tickEnd && tick==TickType.WORLDGUI) || (tickEnd && tick==TickType.GUI))) { return onTickInGUI((Float) data[0], mc, (GuiScreen)data[1]); - } else if (tick == TickType.WORLDLOADTICK) { + } else if (tick == TickType.WORLDLOADTICK && hasWorld) { return onTickInGame(0.0f, mc); } else if (tick == TickType.GUILOADTICK) { return onTickInGUI(0.0f, mc, mc.field_6313_p);