From 9f12cc9528fda1f7f6c675f7d6e4dd0708ff0eb2 Mon Sep 17 00:00:00 2001 From: TomTheFurry Date: Sun, 3 Apr 2022 16:01:53 +0800 Subject: [PATCH] Fix dumb stuff costing performance on world gen --- .../lod/core/builders/lodBuilding/LodBuilder.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 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 933871e5e..2e38b3b63 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 @@ -395,12 +395,13 @@ public class LodBuilder for (int y = yAbs - 1; y >= chunk.getMinBuildHeight(); y--) { IBlockDetailWrapper nextBlock = chunk.getBlockDetail(xAbs, y, zAbs); - if (!isLayerValidLodPoint(nextBlock) - || (strictEdge && hasCliffFace(chunk, xAbs, y, zAbs) && !currentBlockDetail.equals(nextBlock)) ) - { - depth = (short) (y + 1); - break; + if (isLayerValidLodPoint(nextBlock)) { + if (!strictEdge) continue; + if (currentBlockDetail.equals(nextBlock)) continue; + if (!hasCliffFace(chunk, xAbs, y, zAbs)) continue; } + depth = (y + 1); + break; } return depth; }