From adf1de586b9a56669864daeae49c538a81c94077 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Wed, 29 Apr 2020 02:12:51 +0200 Subject: [PATCH] Allow delegation to vanilla chunk gen --- .../0536-Allow-delegation-to-vanilla-chunk-gen.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0536-Allow-delegation-to-vanilla-chunk-gen.patch b/Spigot-Server-Patches/0536-Allow-delegation-to-vanilla-chunk-gen.patch index 39eb305a0..4e54a0d3a 100644 --- a/Spigot-Server-Patches/0536-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/Spigot-Server-Patches/0536-Allow-delegation-to-vanilla-chunk-gen.patch @@ -27,7 +27,7 @@ index b51613040e4583ff056060b47b1f97a86ebcde51..5366314e5f889b5b8d7740bbd0f024d9 for (int l = 0; l < k; ++l) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 56bf840e3d514153ed249093761ddcc04b282403..0d044ed6d7dd77e1dcc6c69a94afb74cb8b9971c 100644 +index 56bf840e3d514153ed249093761ddcc04b282403..d8103ab0d542ced4f30b88ceb4fc4c3eedd5d9a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1972,6 +1972,29 @@ public final class CraftServer implements Server { @@ -46,9 +46,9 @@ index 56bf840e3d514153ed249093761ddcc04b282403..0d044ed6d7dd77e1dcc6c69a94afb74c + list.add(protoChunk); + net.minecraft.server.RegionLimitedWorldAccess genRegion = new net.minecraft.server.RegionLimitedWorldAccess(nmsWorld, list); + // call vanilla generator, one feature after another. Order here is important! -+ net.minecraft.server.ChunkGenerator chunkGenerator = ((CraftWorld) world).getHandle().worldProvider.getChunkGenerator(); ++ net.minecraft.server.ChunkGenerator chunkGenerator = nmsWorld.getChunkProvider().chunkGenerator; + chunkGenerator.createBiomes(protoChunk); -+ chunkGenerator.buildNoise(genRegion, protoChunk); ++ chunkGenerator.buildNoise(genRegion, nmsWorld.getStructureManager(), protoChunk); + chunkGenerator.buildBase(genRegion, protoChunk); + // copy over generated sections + data.setRawChunkData(protoChunk.getSections());