Allow delegation to vanilla chunk gen
This commit is contained in:
parent
40ace3f7b7
commit
adf1de586b
1 changed files with 3 additions and 3 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue