Skip to content

Commit

Permalink
Only make source blocks valid for bottomless pools
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Sep 19, 2024
1 parent aa15182 commit 6b1531f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ private void continueSearch() {
}

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();
Expand Down

0 comments on commit 6b1531f

Please sign in to comment.