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 8eb95d597..de8858531 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 @@ -1279,6 +1279,22 @@ public class Config + "") .build(); + public static ConfigEntry assumePreExistingChunksAreFinished = new ConfigEntry.Builder() + .set(false) + .comment("" + + "When DH pulls in pre-existing chunks it will attempt to \n" + + "run any missing world generation steps; for example: \n" + + "if a chunk has the status SURFACE, DH will skip BIOMES \n" + + "and SURFACE, but will run FEATURES. \n" + + " \n" + + "However if for some reason the chunks are malformed \n" + + "or there's some other issue that causes the status \n" + + "to be incorrect that can either cause world gen \n" + + "lock-ups and/or crashes. \n" + + "If either of those happen try setting this to True. \n" + + "") + .build(); + } public static class MultiThreading diff --git a/core/src/main/java/com/seibel/distanthorizons/core/generation/BatchGenerator.java b/core/src/main/java/com/seibel/distanthorizons/core/generation/BatchGenerator.java index 95de08a1d..4f8971f8d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/generation/BatchGenerator.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/generation/BatchGenerator.java @@ -118,7 +118,10 @@ public class BatchGenerator implements IDhApiWorldGenerator Consumer consumerWrapper = (chunkWrapper) -> resultConsumer.accept(new Object[]{chunkWrapper}); try { - return this.generationEnvironment.generateChunks(chunkPosMinX, chunkPosMinZ, generationRequestChunkWidthCount, targetStep, worldGeneratorThreadPool, consumerWrapper); + return this.generationEnvironment.generateChunks( + chunkPosMinX, chunkPosMinZ, generationRequestChunkWidthCount, + generatorMode, targetStep, + worldGeneratorThreadPool, consumerWrapper); } catch (Exception e) { diff --git a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/worldGeneration/AbstractBatchGenerationEnvironmentWrapper.java b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/worldGeneration/AbstractBatchGenerationEnvironmentWrapper.java index 656d4a3d8..5d68d6aff 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/worldGeneration/AbstractBatchGenerationEnvironmentWrapper.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/worldGeneration/AbstractBatchGenerationEnvironmentWrapper.java @@ -19,6 +19,7 @@ package com.seibel.distanthorizons.core.wrapperInterfaces.worldGeneration; +import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode; import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiWorldGenerationStep; import com.seibel.distanthorizons.core.level.IDhLevel; import com.seibel.distanthorizons.core.wrapperInterfaces.chunk.IChunkWrapper; @@ -38,7 +39,7 @@ public abstract class AbstractBatchGenerationEnvironmentWrapper public abstract void stop(); public abstract CompletableFuture generateChunks( - int minX, int minZ, int genSize, EDhApiWorldGenerationStep targetStep, + int minX, int minZ, int genSize, EDhApiDistantGeneratorMode generatorMode, EDhApiWorldGenerationStep targetStep, ExecutorService worldGeneratorThreadPool, Consumer resultConsumer); } 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 043c46c1d..6dc99dbcf 100644 --- a/core/src/main/resources/assets/distanthorizons/lang/en_us.json +++ b/core/src/main/resources/assets/distanthorizons/lang/en_us.json @@ -565,6 +565,10 @@ "Pull Lighting For Pre-generated Chunks", "distanthorizons.config.common.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.common.lodBuilding.assumePreExistingChunksAreFinished": + "Assume Pre-Existing Chunks Are Finished", + "distanthorizons.config.common.lodBuilding.assumePreExistingChunksAreFinished.@tooltip": + "Setting this to true may solve some issues when using DH with a pre-generated world.", "distanthorizons.config.common.lodBuilding.dataCompression": "Data Compression", "distanthorizons.config.common.lodBuilding.dataCompression.@tooltip":