Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 13:30:05 +01:00
Allow delegation to vanilla chunk gen
Dieser Commit ist enthalten in:
Ursprung
40ace3f7b7
Commit
adf1de586b
@ -27,7 +27,7 @@ index b51613040e4583ff056060b47b1f97a86ebcde51..5366314e5f889b5b8d7740bbd0f024d9
|
|||||||
|
|
||||||
for (int l = 0; l < k; ++l) {
|
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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/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 {
|
@@ -1972,6 +1972,29 @@ public final class CraftServer implements Server {
|
||||||
@ -46,9 +46,9 @@ index 56bf840e3d514153ed249093761ddcc04b282403..0d044ed6d7dd77e1dcc6c69a94afb74c
|
|||||||
+ list.add(protoChunk);
|
+ list.add(protoChunk);
|
||||||
+ net.minecraft.server.RegionLimitedWorldAccess genRegion = new net.minecraft.server.RegionLimitedWorldAccess(nmsWorld, list);
|
+ net.minecraft.server.RegionLimitedWorldAccess genRegion = new net.minecraft.server.RegionLimitedWorldAccess(nmsWorld, list);
|
||||||
+ // call vanilla generator, one feature after another. Order here is important!
|
+ // 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.createBiomes(protoChunk);
|
||||||
+ chunkGenerator.buildNoise(genRegion, protoChunk);
|
+ chunkGenerator.buildNoise(genRegion, nmsWorld.getStructureManager(), protoChunk);
|
||||||
+ chunkGenerator.buildBase(genRegion, protoChunk);
|
+ chunkGenerator.buildBase(genRegion, protoChunk);
|
||||||
+ // copy over generated sections
|
+ // copy over generated sections
|
||||||
+ data.setRawChunkData(protoChunk.getSections());
|
+ data.setRawChunkData(protoChunk.getSections());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren