From b98cfb9666bf106392897fa8a19ff80bf36e5701 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 17 Jun 2021 20:58:20 -0500 Subject: [PATCH] Fix LodChunk not having the detail level set --- src/main/java/com/seibel/lod/builders/LodBuilder.java | 2 +- src/main/java/com/seibel/lod/objects/LodChunk.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/seibel/lod/builders/LodBuilder.java b/src/main/java/com/seibel/lod/builders/LodBuilder.java index 9a134d18d..c871e889c 100644 --- a/src/main/java/com/seibel/lod/builders/LodBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodBuilder.java @@ -145,7 +145,7 @@ public class LodBuilder dataPoints[x][z] = new LodDataPoint(height, depth, color); } - return new LodChunk(chunk.getPos(), dataPoints); + return new LodChunk(chunk.getPos(), dataPoints, detail); } diff --git a/src/main/java/com/seibel/lod/objects/LodChunk.java b/src/main/java/com/seibel/lod/objects/LodChunk.java index 5fe8c22a7..5b280fb51 100644 --- a/src/main/java/com/seibel/lod/objects/LodChunk.java +++ b/src/main/java/com/seibel/lod/objects/LodChunk.java @@ -165,13 +165,15 @@ public class LodChunk /** * Create a LodChunk from the given values. */ - public LodChunk(ChunkPos pos, LodDataPoint[][] newDataPoints) + public LodChunk(ChunkPos pos, LodDataPoint[][] newDataPoints, LodDetail newDetail) { x = pos.x; z = pos.z; dataPoints = newDataPoints; + detail = newDetail; + empty = determineIfEmtpy(); }