From b5ee1135933d28daae785bbc20b780b5de3fa7ba Mon Sep 17 00:00:00 2001 From: PetteriM1 <26197131+PetteriM1@users.noreply.github.com> Date: Sun, 14 Jan 2024 16:26:46 +0200 Subject: [PATCH] regenerateChunk: no unnecessary save + force new chunk generation (#2161) --- src/main/java/cn/nukkit/level/Level.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/nukkit/level/Level.java b/src/main/java/cn/nukkit/level/Level.java index cf9511cdeb4..02e8f50d092 100644 --- a/src/main/java/cn/nukkit/level/Level.java +++ b/src/main/java/cn/nukkit/level/Level.java @@ -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() {