Disable chunk generation on rengeneration (#2114)

The SimpleWorldRegenerator generated world new chunks that were not generated before. 
It is not necessary, as regeneration should happen only on used chunks.
This commit is contained in:
BONNe 2023-04-08 00:39:27 +03:00 committed by GitHub
parent b4737f104c
commit c235abbfa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,12 @@ public abstract class SimpleWorldRegenerator implements WorldRegenerator {
}
final int x = chunkX;
final int z = chunkZ;
newTasks.add(regenerateChunk(gm, di, world, x, z));
// Only process non-generated chunks
if (world.isChunkGenerated(x, z)) {
newTasks.add(regenerateChunk(gm, di, world, x, z));
}
chunkZ++;
if (chunkZ > di.getMaxZChunk()) {
chunkZ = di.getMinZChunk();