From 4cd10a82fd9890697aab69b088a9ce6dfcc6dc30 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Fri, 1 Dec 2023 07:50:14 -0600 Subject: [PATCH] Fix DH lighting failing for water --- .../common/wrappers/block/BlockStateWrapper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java index 1deb708e0..7e473d107 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java @@ -174,7 +174,13 @@ public class BlockStateWrapper implements IBlockStateWrapper public int getOpacity() { // this method isn't perfect, but works well enough for our use case - if (this.isAir() || !this.blockState.canOcclude()) + + if (this.isLiquid() && !this.blockState.canOcclude()) + { + // probably not a waterlogged block (which should block light entirely) + return FULLY_TRANSPARENT + 1; + } + else if (this.isAir() || !this.blockState.canOcclude()) { // completely transparent return FULLY_TRANSPARENT;