Add a config for world gen timeout

This commit is contained in:
James Seibel
2023-07-22 12:34:15 -05:00
parent 4df1bd10a9
commit 860374fd1b
2 changed files with 13 additions and 0 deletions
@@ -657,6 +657,15 @@ public class Config
+ "This will effect generation speed, but not rendering performance.")
.build();
public static ConfigEntry<Integer> worldGenerationTimeoutLengthInSeconds = new ConfigEntry.Builder<Integer>()
.setMinDefaultMax(5, 60, 60*10/*10 minutes*/)
.comment(""
+ "How long should a world generator thread run for before timing out? \n"
+ "Note: If you are experiencing timeout errors it is better to lower your CPU usage first \n"
+ "via the thread config before changing this value. \n"
+ "")
.build();
// deprecated and not implemented, can be made public if we ever re-implement it
@Deprecated
private static ConfigEntry<EGenerationPriority> generationPriority = new ConfigEntry.Builder<EGenerationPriority>()
@@ -279,6 +279,10 @@
"Lighting Engine",
"distanthorizons.config.client.advanced.worldGenerator.worldGenLightingEngine.@tooltip":
"§6Minecraft:§r use Minecraft's lighting engine, gives accurate lighting.\n§6Distant Horizons:§r estimates lighting, shadows won't be as smooth, but is more stable.\n\nIf the LODs appear black, set this to §6Distant Horizons§r.",
"distanthorizons.config.client.advanced.worldGenerator.worldGenerationTimeoutLengthInSeconds":
"Timeout Length In Seconds",
"distanthorizons.config.client.advanced.worldGenerator.worldGenerationTimeoutLengthInSeconds.@tooltip":
"How long should a world generator thread run for before timing out? \nNote: If you are experiencing timeout errors it is better to lower your CPU usage first \nvia the thread config before changing this value.",
"distanthorizons.config.client.advanced.worldGenerator.generationPriority":
"Generation Priority",
"distanthorizons.config.client.advanced.worldGenerator.generationPriority.@tooltip":