From 68ff972ab9eb6b8205952aa192c90511f852bc5e Mon Sep 17 00:00:00 2001 From: andi-makes Date: Sat, 27 Apr 2024 09:07:33 +0200 Subject: [PATCH] fix cross mode --- .../java/dev/schmarrn/lighty/mode/BoringCrossMode.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/dev/schmarrn/lighty/mode/BoringCrossMode.java b/common/src/main/java/dev/schmarrn/lighty/mode/BoringCrossMode.java index b6f86c3..88390e0 100644 --- a/common/src/main/java/dev/schmarrn/lighty/mode/BoringCrossMode.java +++ b/common/src/main/java/dev/schmarrn/lighty/mode/BoringCrossMode.java @@ -42,9 +42,9 @@ public void beforeCompute(BufferBuilder builder) { @Override public void compute(ClientLevel world, BlockPos pos, BufferBuilder builder) { BlockState blockState = world.getBlockState(pos); - if (!LightyHelper.isBlocked(world.getBlockState(pos.below()), pos, world)) { - int blockLightLevel = world.getBrightness(LightLayer.BLOCK, pos); - int skyLightLevel = world.getBrightness(LightLayer.SKY, pos); + if (!LightyHelper.isBlocked(blockState, pos, world)) { + int blockLightLevel = world.getBrightness(LightLayer.BLOCK, pos.above()); + int skyLightLevel = world.getBrightness(LightLayer.SKY, pos.above()); if (LightyHelper.isSafe(blockLightLevel) && !Config.getShowSafe()) { return; @@ -59,7 +59,7 @@ public void compute(ClientLevel world, BlockPos pos, BufferBuilder builder) { float x1 = pos.getX(); float x2 = pos.getX() + 1f; - float y = pos.getY() + 0.005f + offset; + float y = pos.getY() + 1.005f + offset; float z1 = pos.getZ(); float z2 = pos.getZ() + 1f;