diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java index 86565a6b3..7e0f58aa8 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java @@ -332,7 +332,7 @@ public class SharedApi try { // If MC's lighting engine isn't thread safe this may cause the server thread to lag - chunkWrapper.bakeDhLightingUsingMcLightingEngine(); // TODO handle unlit chunks, would pulling in the chunk from disk be a good idea? Look at ChunkLoader in the world gen code for an example + chunkWrapper.bakeDhLightingUsingMcLightingEngine(); } catch (IllegalStateException e) { 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 f424807d5..dc9581d20 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 @@ -752,6 +752,20 @@ public class Config + "") .build(); + public static ConfigEntry pullLightingForPregeneratedChunks = new ConfigEntry.Builder() + .set(false) + .comment("" + + "If true LOD generation for pre-existing chunks will attempt to pull the lighting data \n" + + "saved in Minecraft's Region files. \n" + + "If false DH will pull in chunks without lighting and re-light them. \n" + + " \n" + + "Setting this to true will result in faster LOD generation \n" + + "for already generated worlds, but is broken by most lighting mods. \n" + + " \n" + + "Set this to false if LODs are black. \n" + + "") + .build(); + public static ConfigEntry dataCompression = new ConfigEntry.Builder() .set(EDhApiDataCompressionMode.LZMA2) .comment("" diff --git a/core/src/main/resources/assets/distanthorizons/lang/en_us.json b/core/src/main/resources/assets/distanthorizons/lang/en_us.json index 2aaf12c3b..2c5243d02 100644 --- a/core/src/main/resources/assets/distanthorizons/lang/en_us.json +++ b/core/src/main/resources/assets/distanthorizons/lang/en_us.json @@ -348,6 +348,10 @@ "Only Use DH Lighting Engine", "distanthorizons.config.client.advanced.lodBuilding.onlyUseDhLightingEngine.@tooltip": "If false LODs will be lit by Minecraft's lighting engine when possible \nand fall back to the DH lighting engine only when necessary. \n\nIf true LODs will only be lit using Distant Horizons' lighting engine. \n\nGenerally it is best to leave this disabled and should only be enabled \nif there are lighting issues or for debugging.", + "distanthorizons.config.client.advanced.lodBuilding.pullLightingForPregeneratedChunks": + "Pull Lighting For Pre-generated Chunks", + "distanthorizons.config.client.advanced.lodBuilding.pullLightingForPregeneratedChunks.@tooltip": + "If true LOD generation for pre-existing chunks will attempt to pull the lighting data \nsaved in Minecraft's Region files. \nIf false DH will pull in chunks without lighting and re-light them. \n\nSetting this to true will result in faster LOD generation \nfor already generated worlds, but is broken by most lighting mods. \n\nSet this to false if LODs are black.", "distanthorizons.config.client.advanced.lodBuilding.dataCompression": "Data Compression", "distanthorizons.config.client.advanced.lodBuilding.dataCompression.@tooltip":