Fix DH world gen not priming CARVER heightmaps
Fixes some world gen mods not having access to the necessary heightmaps
This commit is contained in:
+11
-6
@@ -56,6 +56,7 @@ import java.util.concurrent.*;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||||
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -672,12 +673,16 @@ public final class BatchGenerationEnvironment implements IBatchGeneratorEnvironm
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// throwIfThreadInterrupted();
|
// carvers heightmaps are needed by some world gen mods,
|
||||||
// // caves can generally be ignored since they aren't generally visible from far away
|
// otherwise unexpected issues may occur
|
||||||
// if (step == EDhApiWorldGenerationStep.CARVERS)
|
// (like trying to use an empty heightmap and walking out the bottom of
|
||||||
// {
|
// the world looking for a valid snow location).
|
||||||
// return;
|
throwIfThreadInterrupted();
|
||||||
// }
|
for (ChunkWrapper chunkWrapper : chunkWrappersToGenerate)
|
||||||
|
{
|
||||||
|
ChunkAccess chunk = chunkWrapper.getChunk();
|
||||||
|
Heightmap.primeHeightmaps(chunk, ChunkStatus.CARVERS.heightmapsAfter());
|
||||||
|
}
|
||||||
|
|
||||||
throwIfThreadInterrupted();
|
throwIfThreadInterrupted();
|
||||||
this.stepFeatures.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunkWrappersToGenerate, EDhApiWorldGenerationStep.FEATURES));
|
this.stepFeatures.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunkWrappersToGenerate, EDhApiWorldGenerationStep.FEATURES));
|
||||||
|
|||||||
Reference in New Issue
Block a user