From 71986d8818d8b709c00f4525dff944f2559fe962 Mon Sep 17 00:00:00 2001 From: cola98765 Date: Sun, 12 Dec 2021 00:16:34 +0100 Subject: [PATCH] attempt to fix generation below y=0 --- .../seibel/lod/core/builders/lodBuilding/LodBuilder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java index f841e091a..25a2f9c5b 100644 --- a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java +++ b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java @@ -64,9 +64,9 @@ import com.seibel.lod.core.wrapperInterfaces.world.IWorldWrapper; private static final IWrapperFactory FACTORY = SingletonHandler.get(IWrapperFactory.class); /** If no blocks are found in the area in determineBottomPointForArea return this */ - public static final short DEFAULT_DEPTH = 0; + public static final short DEFAULT_DEPTH = -64; //TODO replace with value from version specific constants /** If no blocks are found in the area in determineHeightPointForArea return this */ - public static final short DEFAULT_HEIGHT = -64; + public static final short DEFAULT_HEIGHT = -64; //TODO replace with value from version specific constants /** Minecraft's max light value */ public static final short DEFAULT_MAX_LIGHT = 15; @@ -299,7 +299,7 @@ import com.seibel.lod.core.wrapperInterfaces.world.IWorldWrapper; { short depth = DEFAULT_DEPTH; - for (int y = yAbs; y >= 0; y--) + for (int y = yAbs; y >= DEFAULT_DEPTH; y--) { if (!isLayerValidLodPoint(chunk, xAbs, y, zAbs)) { @@ -319,7 +319,7 @@ import com.seibel.lod.core.wrapperInterfaces.world.IWorldWrapper; height = (short) chunk.getHeightMapValue(xAbs, zAbs); else { - for (int y = yAbs; y >= 0; y--) + for (int y = yAbs; y >= DEFAULT_HEIGHT; y--) { if (isLayerValidLodPoint(chunk, xAbs, y, zAbs)) {