2021-06-11 15:00:00 +10:00

36 lines
1.8 KiB
Diff

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