diff --git a/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java b/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java index 43fdb27d4..ff2551caf 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java @@ -69,15 +69,14 @@ public class AsyncPregenMethod implements PregeneratorMethod { } private void waitForChunks() { - for (CompletableFuture i : future) { + for (CompletableFuture i : future.copy()) { try { i.get(); + future.remove(i); } catch (Throwable e) { e.printStackTrace(); } } - - future.clear(); } @Override