diff --git a/nms-patches/ChunkGenerator.patch b/nms-patches/ChunkGenerator.patch new file mode 100644 index 0000000000..4655ec35e7 --- /dev/null +++ b/nms-patches/ChunkGenerator.patch @@ -0,0 +1,22 @@ +--- 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()); diff --git a/nms-patches/WorldGenStronghold.patch b/nms-patches/WorldGenStronghold.patch new file mode 100644 index 0000000000..3c29071576 --- /dev/null +++ b/nms-patches/WorldGenStronghold.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/WorldGenStronghold.java ++++ b/net/minecraft/server/WorldGenStronghold.java +@@ -67,7 +67,7 @@ + + @Nullable + @Override +- public BlockPosition getNearestGeneratedFeature(World world, ChunkGenerator chunkgenerator, BlockPosition blockposition, int i, boolean flag) { ++ public synchronized BlockPosition getNearestGeneratedFeature(World world, ChunkGenerator chunkgenerator, BlockPosition blockposition, int i, boolean flag) { // CraftBukkit - synchronized + if (!chunkgenerator.getWorldChunkManager().a(this)) { + return null; + } else {