mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Remove WorldLoad tick from modloader mods- too early. *sigh*
This commit is contained in:
1 parent
6d46fefd83
commit
4385704172
3 files changed
+4
-15
No files matched your search
@@ -48,10 +48,6 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
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.WORLDLOAD && hasWorld) {
|
||||
return onTickInGame(0.0f, mc);
|
||||
} else if (tick == TickType.GUILOAD) {
|
||||
return onTickInGUI(0.0f, mc, mc.field_6313_p);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@ public enum TickType {
|
||||
*/
|
||||
public EnumSet<TickType> partnerTicks()
|
||||
{
|
||||
if (this==GAME) return EnumSet.of(RENDER,WORLDLOAD);
|
||||
if (this==RENDER) return EnumSet.of(GAME, WORLDLOAD);
|
||||
if (this==GAME) return EnumSet.of(RENDER);
|
||||
if (this==RENDER) return EnumSet.of(GAME);
|
||||
if (this==GUI) return EnumSet.of(WORLDGUI, GUILOAD);
|
||||
if (this==WORLDGUI) return EnumSet.of(GUI, GUILOAD);
|
||||
if (this==WORLDLOAD) return EnumSet.of(GAME, RENDER);
|
||||
if (this==WORLDLOAD) return EnumSet.noneOf(TickType.class);
|
||||
if (this==GUILOAD) return EnumSet.of(GUI, WORLDGUI);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ModLoaderHelper
|
||||
ModLoaderModContainer mlmc = findOrBuildModContainer(mod);
|
||||
BaseModTicker ticker = mlmc.getTickHandler();
|
||||
EnumSet<TickType> ticks = ticker.ticks();
|
||||
// If we're enabled and we don't want clock ticks we get render ticks
|
||||
// If we're enabled we get render ticks
|
||||
if (enable) {
|
||||
ticks.add(TickType.RENDER);
|
||||
} else {
|
||||
@@ -46,10 +46,6 @@ public class ModLoaderHelper
|
||||
} else {
|
||||
ticks.remove(TickType.GAME);
|
||||
}
|
||||
|
||||
if (enable) {
|
||||
ticks.add(TickType.WORLDLOAD);
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateGUITicks(BaseMod mod, boolean enable, boolean useClock)
|
||||
@@ -68,9 +64,6 @@ public class ModLoaderHelper
|
||||
} else {
|
||||
ticks.remove(TickType.WORLDGUI);
|
||||
}
|
||||
if (enable) {
|
||||
ticks.add(TickType.GUILOAD);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user