Fix snow rendering take 2

This commit is contained in:
James Seibel
2023-08-18 18:15:03 -05:00
parent 42841fe2a1
commit 02449a909a
@@ -38,8 +38,7 @@ 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.getLightBlockingHeightMapValue(x, z) + 2; // + 2 to handle snow and other blocks that may not appear in the height map, but still affect the lighting
y = Math.min(y, chunkWrapper.getMaxBuildHeight()); // prevent accidentally going outside the world height
int y = chunkWrapper.getSolidHeightMapValue(x, z);
for (; y >= chunkWrapper.getMinBuildHeight(); y--)
{