3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00
Paper/nms-patches/ChunkGenerator.patch

23 Zeilen
1.7 KiB
Diff

--- a/net/minecraft/server/ChunkGenerator.java
+++ b/net/minecraft/server/ChunkGenerator.java
@@ -148,6 +148,19 @@
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
StructureStart structurestart = StructureStart.a;
+ // CraftBukkit start
+ if (structuregenerator == WorldGenerator.STRONGHOLD) {
+ synchronized (structuregenerator) {
+ if (structuregenerator.a(chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z)) {
+ BiomeBase biomebase = this.getWorldChunkManager().getBiome(new BlockPosition(chunkcoordintpair.d() + 9, 0, chunkcoordintpair.e() + 9));
+ StructureStart structurestart1 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, biomebase, StructureBoundingBox.a(), 0, chunkgenerator.getSeed());
+
+ structurestart1.a(this, definedstructuremanager, chunkcoordintpair.x, chunkcoordintpair.z, biomebase);
+ structurestart = structurestart1.e() ? structurestart1 : StructureStart.a;
+ }
+ }
+ } else
+ // CraftBukkit end
if (structuregenerator.a(chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z)) {
BiomeBase biomebase = this.getWorldChunkManager().getBiome(new BlockPosition(chunkcoordintpair.d() + 9, 0, chunkcoordintpair.e() + 9));
StructureStart structurestart1 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, biomebase, StructureBoundingBox.a(), 0, chunkgenerator.getSeed());