Skip to content

Commit

Permalink
Disable chunk generation on rengeneration (#2114)
Browse files Browse the repository at this point in the history
The SimpleWorldRegenerator generated world new chunks that were not generated before. 
It is not necessary, as regeneration should happen only on used chunks.
  • Loading branch information
BONNe authored Apr 7, 2023
1 parent b4737f1 commit c235abb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ public void run() {
}
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();
Expand Down

0 comments on commit c235abb

Please sign in to comment.