diff --git a/Core/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java b/Core/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java index 7b48e93d7..aa1ccabdd 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java @@ -245,17 +245,18 @@ public abstract class HybridUtils { } } if (!chunks.isEmpty()) { - while (System.currentTimeMillis() < 10 && !chunks.isEmpty()) { - Iterator iterator = chunks.iterator(); - final ChunkLoc chunk = iterator.next(); - iterator.remove(); - TaskManager.IMP.sync(new RunnableVal() { - @Override - public void run(Object value) { + TaskManager.IMP.sync(new RunnableVal() { + @Override + public void run(Object value) { + long start = System.currentTimeMillis(); + while (System.currentTimeMillis() - start < 20 && !chunks.isEmpty()) { + Iterator iterator = chunks.iterator(); + final ChunkLoc chunk = iterator.next(); + iterator.remove(); regenerateRoad(area, chunk, extend); } - }); - } + } + }); } } catch (Exception e) { e.printStackTrace();