mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Fix ticking for GUI ticks too!
This commit is contained in:
1 parent
c588750c96
commit
05f9861da4
3 files changed
+17
-10
No files matched your search
@@ -57,24 +57,31 @@ public class BaseModTicker implements ITickHandler
|
||||
|
||||
private void tickBaseMod(EnumSet<TickType> types, boolean end, Object... tickData)
|
||||
{
|
||||
if (FMLCommonHandler.instance().getSide().isServer() || ticks.contains(TickType.RENDER))
|
||||
if (FMLCommonHandler.instance().getSide().isClient() && ( ticks.contains(TickType.GAME) || ticks.contains(TickType.WORLDGUI)))
|
||||
{
|
||||
sendTick(types, end, tickData);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (end && ticks.contains(TickType.GAME) && (types.contains(TickType.GAME) || types.contains(TickType.WORLDLOAD)))
|
||||
EnumSet cTypes=EnumSet.copyOf(types);
|
||||
if (end && ( types.contains(TickType.GAME) || types.contains(TickType.WORLDLOAD) || types.contains(TickType.WORLDGUI)))
|
||||
{
|
||||
clockTickTrigger = true;
|
||||
cTypes.remove(TickType.GAME);
|
||||
cTypes.remove(TickType.WORLDLOAD);
|
||||
cTypes.remove(TickType.WORLDGUI);
|
||||
}
|
||||
|
||||
if (end && clockTickTrigger && types.contains(TickType.RENDER))
|
||||
{
|
||||
clockTickTrigger = false;
|
||||
sendTick(EnumSet.of(TickType.GAME),end,tickData);
|
||||
cTypes.remove(TickType.RENDER);
|
||||
if (ticks.contains(TickType.GAME)) cTypes.add(TickType.GAME);
|
||||
if (ticks.contains(TickType.WORLDGUI)) cTypes.add(TickType.WORLDGUI);
|
||||
}
|
||||
|
||||
sendTick(cTypes, end, tickData);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendTick(types, end, tickData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void sendTick(EnumSet<TickType> types, boolean end, Object... tickData)
|
||||
|
||||
Reference in new issue
Block a user