Fully generate chunks when using Internal Server

a bit slower than just doing FEATURES, but allows other mods to use the chunks DH generates
This commit is contained in:
James Seibel
2026-06-08 07:27:02 -05:00
parent 00b47fc776
commit eb82ab1439
2 changed files with 6 additions and 4 deletions
@@ -437,14 +437,16 @@ public class InternalServerGenerator
throw new IllegalStateException("No chunk chunkHolder for pos ["+chunkPos+"] after ticket has been added."); throw new IllegalStateException("No chunk chunkHolder for pos ["+chunkPos+"] after ticket has been added.");
} }
// Note: ChunkStatus.FEATURES would be slightly faster than FULL, but can cause issues
// with other mods where they need lighting/full chunk data.
#if MC_VER <= MC_1_20_4 #if MC_VER <= MC_1_20_4
return chunkHolder.getOrScheduleFuture(ChunkStatus.FEATURES, level.getChunkSource().chunkMap) return chunkHolder.getOrScheduleFuture(ChunkStatus.FULL, level.getChunkSource().chunkMap)
.thenApply(result -> result.left().orElseThrow(() -> new RuntimeException(result.right().get().toString()))); // can throw if the server is shutting down .thenApply(result -> result.left().orElseThrow(() -> new RuntimeException(result.right().get().toString()))); // can throw if the server is shutting down
#elif MC_VER <= MC_1_20_6 #elif MC_VER <= MC_1_20_6
return chunkHolder.getOrScheduleFuture(ChunkStatus.FEATURES, level.getChunkSource().chunkMap) return chunkHolder.getOrScheduleFuture(ChunkStatus.FULL, level.getChunkSource().chunkMap)
.thenApply(result -> result.orElseThrow(() -> new RuntimeException(result.toString()))); // can throw if the server is shutting down .thenApply(result -> result.orElseThrow(() -> new RuntimeException(result.toString()))); // can throw if the server is shutting down
#else #else
return chunkHolder.scheduleChunkGenerationTask(ChunkStatus.FEATURES, level.getChunkSource().chunkMap) return chunkHolder.scheduleChunkGenerationTask(ChunkStatus.FULL, level.getChunkSource().chunkMap)
.thenApply(result -> result.orElseThrow(() -> new RuntimeException(result.getError()))); // can throw if the server is shutting down .thenApply(result -> result.orElseThrow(() -> new RuntimeException(result.getError()))); // can throw if the server is shutting down
#endif #endif