Skip to content

Commit

Permalink
regenerateChunk: no unnecessary save + force new chunk generation (#2161
Browse files Browse the repository at this point in the history
)
  • Loading branch information
PetteriM1 authored Jan 14, 2024
1 parent bec975c commit b5ee113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/cn/nukkit/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -3073,14 +3073,14 @@ public void generateChunk(int x, int z, boolean force) {
}

public void regenerateChunk(int x, int z) {
this.unloadChunk(x, z, false);
this.unloadChunk(x, z, false, false);

this.cancelUnloadChunkRequest(x, z);

BaseFullChunk chunk = provider.getEmptyChunk(x, z);
provider.setChunk(x, z, chunk);

this.generateChunk(x, z);
this.generateChunk(x, z, true);
}

public void doChunkGarbageCollection() {
Expand Down

0 comments on commit b5ee113

Please sign in to comment.