Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-21 05:50:05 +01:00
Don't concurrently execute ChunkGenerators by default
Dieser Commit ist enthalten in:
Ursprung
b9a2a74105
Commit
e2bbf62bf4
@ -67,7 +67,15 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin
|
|||||||
CustomBiomeGrid biomegrid = new CustomBiomeGrid();
|
CustomBiomeGrid biomegrid = new CustomBiomeGrid();
|
||||||
biomegrid.biome = this.getWorldChunkManager().getBiomeBlock(x << 4, z << 4, 16, 16);
|
biomegrid.biome = this.getWorldChunkManager().getBiomeBlock(x << 4, z << 4, 16, 16);
|
||||||
|
|
||||||
ChunkData data = generator.generateChunkData(this.world.getWorld(), random, x, z, biomegrid);
|
ChunkData data;
|
||||||
|
if (generator.isParallelCapable()) {
|
||||||
|
data = generator.generateChunkData(this.world.getWorld(), random, x, z, biomegrid);
|
||||||
|
} else {
|
||||||
|
synchronized (this) {
|
||||||
|
data = generator.generateChunkData(this.world.getWorld(), random, x, z, biomegrid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Preconditions.checkArgument(data instanceof CraftChunkData, "Plugins must use createChunkData(World) rather than implementing ChunkData: %s", data);
|
Preconditions.checkArgument(data instanceof CraftChunkData, "Plugins must use createChunkData(World) rather than implementing ChunkData: %s", data);
|
||||||
CraftChunkData craftData = (CraftChunkData) data;
|
CraftChunkData craftData = (CraftChunkData) data;
|
||||||
ChunkSection[] sections = craftData.getRawChunkData();
|
ChunkSection[] sections = craftData.getRawChunkData();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren