From 974953ae9d81618ab0f1aebdccaad57e91288237 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Fri, 18 Aug 2023 18:44:37 -0500 Subject: [PATCH] Remove height map optimization in LodDataBuilder --- .../core/dataObjects/transformers/LodDataBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/LodDataBuilder.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/LodDataBuilder.java index 4141b12b5..8f7c3b1c9 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/LodDataBuilder.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/LodDataBuilder.java @@ -38,7 +38,9 @@ public class LodDataBuilder // FIXME: The +1 offset to reproduce the old behavior. Remove this when we get per-face lighting byte light = (byte) ((chunkWrapper.getBlockLight(x, lastY + 1, z) << 4) + chunkWrapper.getSkyLight(x, lastY + 1, z)); - int y = chunkWrapper.getSolidHeightMapValue(x, z); + // using a height map to reduce how many empty blocks positions we have to check would be preferable, but there are some world generators + // that don't work well with that, so we have to check the whole column + int y = chunkWrapper.getMaxBuildHeight(); for (; y >= chunkWrapper.getMinBuildHeight(); y--) {