diff --git a/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatPanelBlock.java b/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatPanelBlock.java index 5b2a80f6d..0c8adbcf5 100644 --- a/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatPanelBlock.java +++ b/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatPanelBlock.java @@ -188,7 +188,7 @@ public class CopycatPanelBlock extends WaterloggedCopycatBlock { if (material.skipRendering(otherMaterial, dir.getOpposite())) return isOccluded(state, neighborState, dir.getOpposite()); - OcclusionTestLevel occlusionTestLevel = new OcclusionTestLevel(); + OcclusionTestLevel occlusionTestLevel = new OcclusionTestLevel(level); occlusionTestLevel.setBlock(pos, material); occlusionTestLevel.setBlock(otherPos, otherMaterial); if (material.isSolidRender(occlusionTestLevel, pos) && otherMaterial.isSolidRender(occlusionTestLevel, otherPos)) diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/OcclusionTestLevel.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/OcclusionTestLevel.java index ef72b63c8..458599c8e 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/OcclusionTestLevel.java +++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/OcclusionTestLevel.java @@ -22,6 +22,11 @@ import java.util.Map; @MethodsReturnNonnullByDefault public class OcclusionTestLevel implements BlockGetter { private final Map blocks = new HashMap<>(); + private final BlockGetter blockGetter; + + public OcclusionTestLevel(BlockGetter blockGetter) { + this.blockGetter = blockGetter; + } public void setBlock(BlockPos pos, BlockState state) { blocks.put(pos.immutable(), state); @@ -49,11 +54,11 @@ public class OcclusionTestLevel implements BlockGetter { @Override public int getHeight() { - return 256; + return blockGetter.getHeight(); } @Override public int getMinBuildHeight() { - return 0; + return blockGetter.getMinBuildHeight(); } }