Skip to content

Commit

Permalink
Fix flipped hidesNeighborState
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jul 11, 2024
1 parent 46313ea commit 26d4fd2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public boolean shouldDrawSide(BlockState selfState, BlockGetter view, BlockPos s
// Blocks can define special behavior to control whether faces are rendered.
// This is mostly used by transparent blocks (Leaves, Glass, etc.) to not render interior faces between blocks
// of the same type.
if (selfState.skipRendering(otherState, facing) || PlatformBlockAccess.getInstance().shouldSkipRender(view, selfState, otherState, selfPos, facing)) {
if (selfState.skipRendering(otherState, facing) || PlatformBlockAccess.getInstance().shouldSkipRender(view, selfState, otherState, selfPos, otherPos, facing)) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ static PlatformBlockAccess getInstance() {
* @param selfState The block currently being drawn.
* @param otherState The adjacent block.
* @param selfPos The current block position.
* @param otherPos The other block position.
* @param facing The direction between the two blocks.
* @return If the block's face should be skipped.
*/
boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, Direction facing);
boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, BlockPos otherPos, Direction facing);

/**
* Returns if the fluid should render fluid overlays if a block is adjacent to it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public int getLightEmission(BlockState state, BlockAndTintGetter level, BlockPos
}

@Override
public boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, Direction facing) {
public boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, BlockPos otherPos, Direction facing) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public int getLightEmission(BlockState state, BlockAndTintGetter level, BlockPos
}

@Override
public boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, Direction facing) {
return (otherState.hidesNeighborFace(level, selfPos, otherState, DirectionUtil.getOpposite(facing))) && selfState.supportsExternalFaceHiding();
public boolean shouldSkipRender(BlockGetter level, BlockState selfState, BlockState otherState, BlockPos selfPos, BlockPos otherPos, Direction facing) {
return (otherState.hidesNeighborFace(level, otherPos, selfState, DirectionUtil.getOpposite(facing))) && selfState.supportsExternalFaceHiding();
}

@Override
Expand Down

0 comments on commit 26d4fd2

Please sign in to comment.