From 7fd8362d6c044a77a60b979ea9a0d94ed0430ada Mon Sep 17 00:00:00 2001 From: Felix Cravic Date: Sat, 2 May 2020 23:48:01 +0200 Subject: [PATCH] ChunkPopulator fix by clearing data list --- .../java/net/minestom/server/instance/batch/ChunkBatch.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java b/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java index 64ff205a3..f2d96b97f 100644 --- a/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java +++ b/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java @@ -68,6 +68,8 @@ public class ChunkBatch implements InstanceBatch { chunkGenerator.generateChunkData(this, chunk.getChunkX(), chunk.getChunkZ()); singleThreadFlush(hasPopulator ? null : callback); + clearData(); // So the populators won't place those blocks again + if (populators != null && !populators.isEmpty()) { Iterator populatorIterator = populators.iterator(); while (populatorIterator.hasNext()) { @@ -76,6 +78,7 @@ public class ChunkBatch implements InstanceBatch { } singleThreadFlush(callback); } + clearData(); // Clear populators blocks }); }