Only make source blocks valid for bottomless pools

This commit is contained in:
IThundxr 2024-09-19 17:24:24 -04:00
parent e3331d363d
commit a302178374
Failed to generate hash of commit

View file

@ -279,7 +279,14 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
}
int maxBlocks = maxBlocks();
if (visited.size() > maxBlocks && canDrainInfinitely(fluid) && !queue.isEmpty()) {
int sourceBlocks = 0;
for (BlockPos pos : visited) {
if (getWorld().getFluidState(pos).isSource())
sourceBlocks++;
}
if (sourceBlocks > maxBlocks && canDrainInfinitely(fluid) && !queue.isEmpty()) {
infinite = true;
BlockPos firstValid = queue.first()
.pos();