Fix ticking for new name "GAME" vs "WORLD"
This commit is contained in:
parent
0814f177c5
commit
110ca0f3ba
|
@ -19,7 +19,7 @@ import java.util.EnumSet;
|
||||||
public enum TickType {
|
public enum TickType {
|
||||||
/**
|
/**
|
||||||
* Fired during the world evaluation loop
|
* Fired during the world evaluation loop
|
||||||
* server side
|
* server and client side
|
||||||
*
|
*
|
||||||
* arg 0 : The world that is ticking
|
* arg 0 : The world that is ticking
|
||||||
*/
|
*/
|
||||||
|
@ -67,11 +67,11 @@ public enum TickType {
|
||||||
*/
|
*/
|
||||||
public EnumSet<TickType> partnerTicks()
|
public EnumSet<TickType> partnerTicks()
|
||||||
{
|
{
|
||||||
if (this==WORLD) return EnumSet.of(RENDER,WORLDLOAD);
|
if (this==GAME) return EnumSet.of(RENDER,WORLDLOAD);
|
||||||
if (this==RENDER) return EnumSet.of(WORLD, WORLDLOAD);
|
if (this==RENDER) return EnumSet.of(GAME, WORLDLOAD);
|
||||||
if (this==GUI) return EnumSet.of(WORLDGUI, GUILOAD);
|
if (this==GUI) return EnumSet.of(WORLDGUI, GUILOAD);
|
||||||
if (this==WORLDGUI) return EnumSet.of(GUI, 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);
|
if (this==GUILOAD) return EnumSet.of(GUI, WORLDGUI);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,11 +40,11 @@ public class ModLoaderHelper
|
||||||
} else {
|
} else {
|
||||||
ticks.remove(TickType.RENDER);
|
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())) {
|
if (enable && (useClock || FMLCommonHandler.instance().getSide().isServer())) {
|
||||||
ticks.add(TickType.WORLD);
|
ticks.add(TickType.GAME);
|
||||||
} else {
|
} else {
|
||||||
ticks.remove(TickType.WORLD);
|
ticks.remove(TickType.GAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
|
|
Loading…
Reference in New Issue