Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ private boolean isFluidSelfVisible(BlockState selfBlockState, Direction facing,
// only a non-empty self-shape can occlude anything
if (!ShapeComparisonCache.isEmptyShape(selfShape)) {
// a full self-shape occludes everything
if (ShapeComparisonCache.isFullShape(selfShape) && ShapeComparisonCache.isFullShape(fluidShape)) {
return false;
if (ShapeComparisonCache.isFullShape(selfShape)) {
return !ShapeComparisonCache.isFullShape(fluidShape);
Comment thread
Auth0x78 marked this conversation as resolved.
}

// perform occlusion of the fluid by the block it's contained in
Expand All @@ -168,7 +168,12 @@ private boolean isFluidSelfVisible(BlockState selfBlockState, Direction facing,
return true;
}

private boolean isFullBlockFluidSelfVisible(BlockState blockState, Direction dir, VoxelShape fluidShape) {
return this.isFluidSelfVisible(blockState, dir, fluidShape);
}

private boolean isFullBlockFluidSelfVisible(BlockState blockState, Direction dir) {
// Assume that is the fluid block is a full sized block
return this.isFluidSelfVisible(blockState, dir, Shapes.block());
}

Expand Down Expand Up @@ -232,7 +237,8 @@ private boolean isSideExposedOffset(BlockAndTintGetter world, BlockState ownBloc
* Calculates the combined visibility of a fluid face based on the neighboring block states and the fluid state.
*/
private boolean isFullBlockFluidVisible(BlockAndTintGetter world, BlockPos pos, Direction dir, BlockState blockState, FluidState fluid) {
return this.isFullBlockFluidSelfVisible(blockState, dir) && this.isFullBlockFluidSideVisible(world, pos, dir, fluid);
VoxelShape fluidShape = fluid.getShape(world, pos);
return isFullBlockFluidSelfVisible(blockState, dir, fluidShape) && this.isFullBlockFluidSideVisible(world, pos, dir, fluid);
}

/**
Expand Down