Skip to content

Commit

Permalink
improve top face hiding heuristic to also check for source blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
douira committed Dec 11, 2024
1 parent baba058 commit 6972baf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ private boolean isUpFaceExposedByNeighbors(LevelSlice level, BlockPos blockPos,
}

// the face is visible if any of the blocks
BlockPos blockPos2 = this.scratchPos.setWithOffset(blockPos, i, yOffset, j);
if (!level.getFluidState(blockPos2).getType().isSame(fluid) && !level.getBlockState(blockPos2).isSolidRender()) {
BlockPos otherBlockPos = this.scratchPos.setWithOffset(blockPos, i, yOffset, j);
if (!(level.getFluidState(otherBlockPos).isSourceOfType(fluid) || level.getBlockState(otherBlockPos).isSolidRender())) {
return true;
}
}
Expand Down

0 comments on commit 6972baf

Please sign in to comment.