Expose vanilla BiomeProvider from WorldInfo

This commit is contained in:
Jason Penilla
2022-01-06 15:59:06 -08:00
parent a6dd9f7a68
commit 25af4f1bec
6 changed files with 78 additions and 14 deletions

View File

@@ -212,7 +212,7 @@
+ this.serverLevelData.setWorld(this);
+
+ if (biomeProvider != null) {
+ BiomeSource worldChunkManager = new CustomWorldChunkManager(this.getWorld(), biomeProvider, this.server.registryAccess().lookupOrThrow(Registries.BIOME));
+ BiomeSource worldChunkManager = new CustomWorldChunkManager(this.getWorld(), biomeProvider, this.server.registryAccess().lookupOrThrow(Registries.BIOME), chunkgenerator.getBiomeSource()); // Paper - add vanillaBiomeProvider
+ if (chunkgenerator instanceof NoiseBasedChunkGenerator cga) {
+ chunkgenerator = new NoiseBasedChunkGenerator(worldChunkManager, cga.settings);
+ } else if (chunkgenerator instanceof FlatLevelSource cpf) {