From f8ef7be48ddac73275ec0f7a67388c7e314c7ec4 Mon Sep 17 00:00:00 2001 From: glutzer Date: Sun, 24 Apr 2022 16:31:29 -0500 Subject: [PATCH] Update FluidFillingBehaviour.java now properly fills infinitely --- .../fluids/actors/FluidFillingBehaviour.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java index 98a1d6278..b221fba44 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java @@ -72,7 +72,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour { (p, d) -> infinityCheckFrontier.add(new BlockPosEntry(p, d)), true); int maxBlocks = maxBlocks(); - if (infinityCheckVisited.size() > maxBlocks && maxBlocks != -1) { + if (infinityCheckVisited.size() > maxBlocks && maxBlocks != -1 && !fillInfinite()) { if (!infinite) { reset(); infinite = true; @@ -163,9 +163,11 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour { if (visited.size() >= maxBlocks && maxBlocks != -1) { infinite = true; - visited.clear(); - queue.clear(); - return false; + if (!fillInfinite()) { + visited.clear(); + queue.clear(); + return false; + } } SpaceType spaceType = getAtPos(world, currentPos, fluid);