From 17225fb5d3727f677121ec6017d5f09b632af9a9 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 18 Jan 2021 18:26:37 -0800 Subject: add comment as to onServerTick vs onWorldTick --- src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/gregtech/api/threads') diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java index e46d63cdff..6564cf316a 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -49,6 +49,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { @SubscribeEvent public void onServerTick(TickEvent.ServerTickEvent aEvent) { + // Using onServerTick because there's race conditions in updateTrackedEntities() which is called AFTER the END phase of onWorldTick if (aEvent.phase == TickEvent.Phase.START) { lock.lock(); } else { -- cgit