fix smeltery tps lag by clearing drain array before structure check (#82)

This commit is contained in:
Dennis authored and GitHub committed 2023-05-02 21:50:49 +02:00
1 parent d007ec5e8f
commit 770a609f7a
2 files changed
+5 -1

No files matched your search

@@ -373,7 +373,10 @@ public abstract class CastingBlockLogic extends InventoryLogic implements IFluid
tick++;
if (tick % 20 == 0) {
tick = 0;
if (needsUpdate) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
if (needsUpdate) {
needsUpdate = false;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
@@ -794,6 +794,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public boolean checkSameLevel(int x, int y, int z, int[] sides) {
lavaTanks.clear();
drains.clear();
boolean check = checkBricksOnLevel(x, y, z, sides);
return check && lavaTanks.size() > 0;
}