13
0
geforkt von Mirrors/Paper
Paper/nms-patches/ChunkGenerator.patch
2020-08-12 07:00:00 +10:00

36 Zeilen
1.8 KiB
Diff

--- a/net/minecraft/server/ChunkGenerator.java
+++ b/net/minecraft/server/ChunkGenerator.java
@@ -210,7 +210,16 @@
while (iterator.hasNext()) {
Supplier<StructureFeature<?, ?>> supplier = (Supplier) iterator.next();
- this.a((StructureFeature) supplier.get(), iregistrycustom, structuremanager, ichunkaccess, definedstructuremanager, i, chunkcoordintpair, biomebase);
+ // CraftBukkit start
+ StructureFeature<?, ?> structurefeature = (StructureFeature) supplier.get();
+ if (structurefeature.c == StructureGenerator.STRONGHOLD) {
+ synchronized (structurefeature) {
+ this.a(structurefeature, iregistrycustom, structuremanager, ichunkaccess, definedstructuremanager, i, chunkcoordintpair, biomebase);
+ }
+ } else {
+ this.a(structurefeature, iregistrycustom, structuremanager, ichunkaccess, definedstructuremanager, i, chunkcoordintpair, biomebase);
+ }
+ // CraftBukkit end
}
}
@@ -294,9 +303,11 @@
}
static {
- IRegistry.a(IRegistry.CHUNK_GENERATOR, "noise", (Object) ChunkGeneratorAbstract.d);
- IRegistry.a(IRegistry.CHUNK_GENERATOR, "flat", (Object) ChunkProviderFlat.d);
- IRegistry.a(IRegistry.CHUNK_GENERATOR, "debug", (Object) ChunkProviderDebug.d);
+ // CraftBukkit start - decompile errors
+ IRegistry.a(IRegistry.CHUNK_GENERATOR, "noise", ChunkGeneratorAbstract.d);
+ IRegistry.a(IRegistry.CHUNK_GENERATOR, "flat", ChunkProviderFlat.d);
+ IRegistry.a(IRegistry.CHUNK_GENERATOR, "debug", ChunkProviderDebug.d);
+ // CraftBukkit end
a = IRegistry.CHUNK_GENERATOR.dispatchStable(ChunkGenerator::a, Function.identity());
}
}