diff options
author | Mogball <jeffniu22@gmail.com> | 2020-04-12 16:32:50 -0400 |
---|---|---|
committer | Mogball <jeffniu22@gmail.com> | 2020-04-12 16:32:50 -0400 |
commit | 209d62576be81d919b1db916c3c8540c1ca03eed (patch) | |
tree | c42b1790fed83e66fc294b822344865bc52626ff | |
parent | 481ff7cc3aad20dda680aff943ad366a02f4dbee (diff) | |
download | GT5-Unofficial-209d62576be81d919b1db916c3c8540c1ca03eed.tar.gz GT5-Unofficial-209d62576be81d919b1db916c3c8540c1ca03eed.tar.bz2 GT5-Unofficial-209d62576be81d919b1db916c3c8540c1ca03eed.zip |
Fix non GT tileentities should still propagate
-rw-r--r-- | src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java | 8 |
1 files changed, 6 insertions, 2 deletions
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 523d504884..1f47ed3bfe 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -20,6 +20,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { private final World mWorld; private final Set<ChunkPosition> mVisited; + // Hopefully large enough for most multi-block machines private static final int MAX_UPDATE_DEPTH = 128; public GT_Runnable_MachineBlockUpdate(World aWorld, int aX, int aY, int aZ) { @@ -35,9 +36,12 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { } private boolean shouldUpdate(TileEntity aTileEntity) { - // Stop recursion on cables and pipes - if (aTileEntity == null || !(aTileEntity instanceof IGregTechTileEntity)) + if (aTileEntity == null) return false; + + // Stop recursion on GregTech cables, item pipes, and fluid pipes + if (!(aTileEntity instanceof IGregTechTileEntity)) + return true; IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity(); return !(tMetaTileEntity instanceof GT_MetaPipeEntity_Cable) && |