From 03f57d27be5cdc7409d29abc47ef5c6c34815f34 Mon Sep 17 00:00:00 2001 From: Foxy Date: Tue, 12 Nov 2024 21:30:25 +0100 Subject: [PATCH] Fixed check surroundings --- .../src/main/java/ca/fxco/moreculling/utils/CullingUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/ca/fxco/moreculling/utils/CullingUtils.java b/common/src/main/java/ca/fxco/moreculling/utils/CullingUtils.java index e7f336b..680a70f 100644 --- a/common/src/main/java/ca/fxco/moreculling/utils/CullingUtils.java +++ b/common/src/main/java/ca/fxco/moreculling/utils/CullingUtils.java @@ -101,14 +101,14 @@ public static boolean areLeavesOpaque() { public static Optional shouldDrawFaceCheck(BlockGetter view, BlockState sideState, BlockPos thisPos, BlockPos sidePos, Direction side) { if (sideState.getBlock() instanceof LeavesBlock || - (sideState.canOcclude() && sideState.isFaceSturdy(view, sidePos, side))) { + (sideState.canOcclude() && sideState.isFaceSturdy(view, sidePos, side.getOpposite()))) { boolean isSurrounded = true; for (Direction dir : DirectionUtils.DIRECTIONS) { if (dir != side) { BlockPos pos = thisPos.relative(dir); BlockState state = view.getBlockState(pos); isSurrounded &= state.getBlock() instanceof LeavesBlock || - (sideState.canOcclude() && state.isFaceSturdy(view, pos, dir)); + (state.canOcclude() && state.isFaceSturdy(view, pos, dir.getOpposite())); } } return isSurrounded ? Optional.of(false) : Optional.empty();