1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 10:41:41 +01:00

Allow delegation to vanilla chunk gen

This commit is contained in:
MiniDigger | Martin 2020-04-29 02:12:51 +02:00
parent 4cb36133b6
commit 149172d006

View file

@ -46,9 +46,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ 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());