From 9ba1b18fac04bf21ff858976ef258b7ff18d50a9 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 31 Aug 2023 21:43:17 -0500 Subject: [PATCH] Remove debug disable lighting engine configs --- .../distanthorizons/core/config/Config.java | 14 ----------- .../core/generation/DhLightingEngine.java | 7 ------ .../chunk/IChunkWrapper.java | 25 ++++++++----------- 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java index 5354cd921..c1233ce7e 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java @@ -1111,20 +1111,6 @@ public class Config .set(ExampleConfigScreen.class) .build(); - public static ConfigEntry disableDhLightingEngine = new ConfigEntry.Builder() - .set(false) - .comment("" - + "Temporary, only for testing." - + "") - .build(); - - public static ConfigEntry disableChunkWrapperLightBaking = new ConfigEntry.Builder() - .set(false) - .comment("" - + "Temporary, only for testing." - + "") - .build(); - /** This class is used to debug the different features of the config GUI */ // FIXME: WARNING: Some of the options in this class dont get show n in the default UI diff --git a/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java b/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java index 104e90bb6..da988e4d5 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java @@ -39,13 +39,6 @@ public class DhLightingEngine */ public void lightChunk(IChunkWrapper centerChunk, List nearbyChunkList, int maxSkyLight) { - if (Config.Client.Advanced.Debugging.disableDhLightingEngine.get()) - { - centerChunk.setIsDhLightCorrect(true); - return; - } - - DhChunkPos centerChunkPos = centerChunk.getChunkPos(); AdjacentChunkHolder adjacentChunkHolder = new AdjacentChunkHolder(centerChunk); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/chunk/IChunkWrapper.java b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/chunk/IChunkWrapper.java index 69557cd5b..d94b1f145 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/chunk/IChunkWrapper.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/chunk/IChunkWrapper.java @@ -75,23 +75,20 @@ public interface IChunkWrapper extends IBindable */ default void bakeDhLightingUsingMcLightingEngine() throws IllegalStateException { - if (!Config.Client.Advanced.Debugging.disableChunkWrapperLightBaking.get()) + if (!this.isLightCorrect()) { - if (!this.isLightCorrect()) + throw new IllegalStateException("Unable to bake lighting for for chunk [" + this.getChunkPos() + "], Minecraft lighting not valid."); + } + + // get the lighting for every relative block pos + for (int relX = 0; relX < LodUtil.CHUNK_WIDTH; relX++) + { + for (int relZ = 0; relZ < LodUtil.CHUNK_WIDTH; relZ++) { - throw new IllegalStateException("Unable to bake lighting for for chunk [" + this.getChunkPos() + "], Minecraft lighting not valid."); - } - - // get the lighting for every relative block pos - for (int relX = 0; relX < LodUtil.CHUNK_WIDTH; relX++) - { - for (int relZ = 0; relZ < LodUtil.CHUNK_WIDTH; relZ++) + for (int y = this.getMinBuildHeight(); y < this.getMaxBuildHeight(); y++) { - for (int y = this.getMinBuildHeight(); y < this.getMaxBuildHeight(); y++) - { - this.setDhSkyLight(relX, y, relZ, this.getSkyLight(relX, y, relZ)); - this.setDhBlockLight(relX, y, relZ, this.getBlockLight(relX, y, relZ)); - } + this.setDhSkyLight(relX, y, relZ, this.getSkyLight(relX, y, relZ)); + this.setDhBlockLight(relX, y, relZ, this.getBlockLight(relX, y, relZ)); } } }