Add a config to enable/disable using MC's lighting engine

This commit is contained in:
James Seibel
2023-12-02 12:37:27 -06:00
parent b5853d20ee
commit 5e413cfe93
3 changed files with 19 additions and 1 deletions
@@ -254,7 +254,8 @@ public class SharedApi
{
// Save or populate the chunk wrapper's lighting
// this is done so we don't have to worry about MC unloading the lighting data for this chunk
if (chunkWrapper.isLightCorrect())
boolean onlyUseDhLighting = Config.Client.Advanced.LodBuilding.onlyUseDhLightingEngine.get();
if (!onlyUseDhLighting && chunkWrapper.isLightCorrect())
{
try
{
@@ -764,6 +764,19 @@ public class Config
+ "")
.build();
public static ConfigEntry<Boolean> onlyUseDhLightingEngine = new ConfigEntry.Builder<Boolean>()
.set(false)
.comment(""
+ "If false LODs will be lit by Minecraft's lighting engine when possible \n"
+ "and fall back to the DH lighting engine only when necessary. \n"
+ "\n"
+ "If true LODs will only be lit using Distant Horizons' lighting engine. \n"
+ "\n"
+ "Generally it is best to leave this disabled and should only be enabled \n"
+ "if there are lighting issues or for debugging. \n"
+ "")
.build();
}
public static class Multiplayer
@@ -335,6 +335,10 @@
"Minimum Time Between Chunk Updates In Seconds",
"distanthorizons.config.client.advanced.lodBuilding.minTimeBetweenChunkUpdatesInSeconds.@tooltip":
"Determines how long must pass between LOD chunk updates before another. \nupdate can occur\n\nIncreasing this value will reduce CPU load but may may cause \nLODs to become outdated more frequently or for longer.",
"distanthorizons.config.client.advanced.lodBuilding.onlyUseDhLightingEngine":
"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.multiplayer":