From 13f28a9bd8db3bf2adc7d01f43f18dfd05c37fb6 Mon Sep 17 00:00:00 2001 From: TomTheFurry Date: Mon, 25 Jul 2022 21:23:36 +0800 Subject: [PATCH] Fix stuff so fabric works and no crash. Sadly nothing renders though... --- .../worldGeneration/BatchGenerationEnvironment.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 886f93eb0..109699718 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -195,9 +195,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread = BatchGenerationEnvironment::isCurrentThreadDistantGeneratorThread; } - public ExecutorService executors = Executors.newFixedThreadPool( - Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get()<1 ? 1 : - (int) Math.ceil(Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get()), + public ExecutorService executors = Executors.newFixedThreadPool(Config.Client.Advanced.Threading.getWorldGenerationThreadPoolSize(), threadFactory); public T joinSync(CompletableFuture f) { @@ -269,7 +267,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv { super(serverlevel); EVENT_LOGGER.info("================WORLD_GEN_STEP_INITING============="); - ChunkGenerator generator = ((LevelWrapper) serverlevel).getServerWorld().getChunkSource().getGenerator(); + ChunkGenerator generator = ((LevelWrapper) serverlevel.getLevelWrapper()).getServerWorld().getChunkSource().getGenerator(); if (!(generator instanceof NoiseBasedChunkGenerator || generator instanceof DebugLevelSource || generator instanceof FlatLevelSource)) {