From 6015b9a1dc6f2be3c14ca1b1ec97106f2349285e Mon Sep 17 00:00:00 2001 From: tom lee Date: Thu, 23 Dec 2021 18:26:54 +0800 Subject: [PATCH] ExperWorldGen: Increased timeout for slow CPUs --- .../common/wrappers/worldGeneration/WorldGenerationStep.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/WorldGenerationStep.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/WorldGenerationStep.java index f15ce7851..b75e654e4 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/WorldGenerationStep.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/WorldGenerationStep.java @@ -68,6 +68,8 @@ import net.minecraft.world.level.storage.WorldData; public final class WorldGenerationStep { + public static final int TIMEOUT_SECONDS = 30; + enum Steps { Empty, StructureStart, StructureReference, Biomes, Noise, Surface, Carvers, LiquidCarvers, Features, Light, } @@ -283,7 +285,7 @@ public final class WorldGenerationStep { } finally { iter.remove(); } - } else if (event.hasTimeout(5, TimeUnit.SECONDS)) { + } else if (event.hasTimeout(TIMEOUT_SECONDS, TimeUnit.SECONDS)) { System.err.println(event.id+": Timed out and terminated!"); try { event.terminate();