diff --git a/client/net/minecraft/src/BaseMod.java b/client/net/minecraft/src/BaseMod.java index 827c850049..fcbda39a0c 100644 --- a/client/net/minecraft/src/BaseMod.java +++ b/client/net/minecraft/src/BaseMod.java @@ -34,7 +34,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod { this.keyboardEvent((KeyBinding)keybinding); } - + /** * @param minecraftInstance * @return @@ -46,7 +46,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod // World and render ticks if (tickEnd && ( tick==TickType.RENDER || tick==TickType.GAME ) && hasWorld) { return onTickInGame((Float) data[0], mc); - } else if (tickEnd && (tick==TickType.WORLDGUI || tick==TickType.GUI) && data[1]!=null) { + } else if (tickEnd && (tick==TickType.WORLDGUI || tick==TickType.GUI)) { return onTickInGUI((Float) data[0], mc, (GuiScreen)data[1]); } return true; @@ -58,11 +58,11 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod public final void onRenderHarvest(Map renderers) { addRenderer((Map,Render>)renderers); - + } /** - * + * */ public final void onRegisterAnimations() { @@ -99,11 +99,11 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod public final void onServerLogin(Object handler) { serverConnect((NetClientHandler) handler); } - + public final void onServerLogout() { serverDisconnect(); } - + @Override public final void onPlayerLogin(Object player) { @@ -163,7 +163,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod // BASEMOD API /** * Override if you wish to provide a fuel item for the furnace and return the fuel value of the item - * + * * @param id * @param metadata * @return @@ -180,7 +180,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Override if you wish to perform some action other than just dispensing the item from the dispenser - * + * * @param world * @param x * @param y @@ -197,7 +197,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Override if you wish to generate Nether (Hell biome) blocks - * + * * @param world * @param random * @param chunkX @@ -209,7 +209,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Override if you wish to generate Overworld (not hell or the end) blocks - * + * * @param world * @param random * @param chunkX @@ -221,7 +221,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Return the name of your mod. Defaults to the class name - * + * * @return */ public String getName() @@ -231,7 +231,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Get your mod priorities - * + * * @return */ public String getPriorities() @@ -241,7 +241,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Return the version of your mod - * + * * @return */ public abstract String getVersion(); @@ -265,7 +265,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Handle item pickup - * + * * @param player * @param item */ @@ -275,7 +275,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Ticked every game tick if you have subscribed to tick events through {@link ModLoader#setInGameHook(BaseMod, boolean, boolean)} - * + * * @param time the rendering subtick time (0.0-1.0) * @param minecraftInstance the client * @return true to continue receiving ticks @@ -293,7 +293,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Only implemented on the client side * {@link #onChatMessageReceived(EntityPlayer, Packet3Chat)} - * + * * @param text */ public void receiveChatPacket(String text) @@ -304,7 +304,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Only called on the client side * {@link #onPacket250Received(EntityPlayer, Packet250CustomPayload)} - * + * * @param packet */ public void receiveCustomPacket(Packet250CustomPayload packet) @@ -329,15 +329,15 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod } public void serverConnect(NetClientHandler handler) { - + } - + public void serverDisconnect() { - + } /** * Called when someone crafts an item from a crafting table - * + * * @param player * @param item * @param matrix @@ -377,7 +377,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Called when a chat message is received. Return true to stop further processing - * + * * @param source * @param chat * @return true if you want to consume the message so it is not available for further processing @@ -398,7 +398,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Called when a new client logs in. - * + * * @param player */ public void onClientLogin(EntityPlayer player) @@ -407,7 +407,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod /** * Called when a client logs out of the server. - * + * * @param player */ public void onClientLogout(EntityPlayer player) @@ -416,9 +416,9 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod } /** - * + * * Called when a client changes dimensions on the server. - * + * * @param player */ public void onClientDimensionChanged(EntityPlayer player) diff --git a/common/cpw/mods/fml/common/modloader/BaseModTicker.java b/common/cpw/mods/fml/common/modloader/BaseModTicker.java index 5e96272f30..af231d8151 100644 --- a/common/cpw/mods/fml/common/modloader/BaseModTicker.java +++ b/common/cpw/mods/fml/common/modloader/BaseModTicker.java @@ -30,25 +30,25 @@ public class BaseModTicker implements ITickHandler private BaseMod mod; private EnumSet ticks; private boolean clockTickTrigger; - - + + BaseModTicker(BaseMod mod) { this.mod = mod; this.ticks = EnumSet.of(TickType.WORLDLOAD); } - + BaseModTicker(EnumSet ticks) { this.ticks = ticks; } - + @Override public void tickStart(EnumSet types, Object... tickData) { tickBaseMod(types, false, tickData); } - + @Override public void tickEnd(EnumSet types, Object... tickData) { @@ -60,14 +60,14 @@ public class BaseModTicker implements ITickHandler if (FMLCommonHandler.instance().getSide().isClient() && ( ticks.contains(TickType.GAME) || ticks.contains(TickType.WORLDGUI))) { EnumSet cTypes=EnumSet.copyOf(types); - if (end && ( types.contains(TickType.GAME) || types.contains(TickType.WORLDLOAD) || types.contains(TickType.WORLDGUI))) + if ( ( end && ( types.contains(TickType.GAME) || types.contains(TickType.WORLDGUI))) || types.contains(TickType.WORLDLOAD) ) { clockTickTrigger = true; cTypes.remove(TickType.GAME); cTypes.remove(TickType.WORLDLOAD); cTypes.remove(TickType.WORLDGUI); } - + if (end && clockTickTrigger && types.contains(TickType.RENDER)) { clockTickTrigger = false; @@ -75,7 +75,7 @@ public class BaseModTicker implements ITickHandler if (ticks.contains(TickType.GAME)) cTypes.add(TickType.GAME); if (ticks.contains(TickType.WORLDGUI)) cTypes.add(TickType.WORLDGUI); } - + sendTick(cTypes, end, tickData); } else @@ -83,7 +83,7 @@ public class BaseModTicker implements ITickHandler sendTick(types, end, tickData); } } - + private void sendTick(EnumSet types, boolean end, Object... tickData) { for (TickType type : types)