Paper/nms-patches/ChunkGenerator.patch

36 Zeilen
1.8 KiB
Diff

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