Fix ticking for new name "GAME" vs "WORLD"

This commit is contained in:
Christian 2012-06-07 16:21:01 -04:00
parent 0814f177c5
commit 110ca0f3ba
2 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ import java.util.EnumSet;
public enum TickType {
/**
* Fired during the world evaluation loop
* server side
* server and client side
*
* arg 0 : The world that is ticking
*/
@ -67,11 +67,11 @@ public enum TickType {
*/
public EnumSet<TickType> partnerTicks()
{
if (this==WORLD) return EnumSet.of(RENDER,WORLDLOAD);
if (this==RENDER) return EnumSet.of(WORLD, WORLDLOAD);
if (this==GAME) return EnumSet.of(RENDER,WORLDLOAD);
if (this==RENDER) return EnumSet.of(GAME, WORLDLOAD);
if (this==GUI) return EnumSet.of(WORLDGUI, GUILOAD);
if (this==WORLDGUI) return EnumSet.of(GUI, GUILOAD);
if (this==WORLDLOAD) return EnumSet.of(WORLD, RENDER);
if (this==WORLDLOAD) return EnumSet.of(GAME, RENDER);
if (this==GUILOAD) return EnumSet.of(GUI, WORLDGUI);
return null;
}

View File

@ -40,11 +40,11 @@ public class ModLoaderHelper
} else {
ticks.remove(TickType.RENDER);
}
// If we're enabled but we want clock ticks, or we're server side we get world ticks
// 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.WORLD);
ticks.add(TickType.GAME);
} else {
ticks.remove(TickType.WORLD);
ticks.remove(TickType.GAME);
}
if (enable) {