From 8c52e207362beb83f7a0f469b19a5a32b453917c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 31 Dec 2018 16:08:09 +0000 Subject: [PATCH] Use BaseBlocks in regenallroads and minor cleanup of HybridUtils. Fixes #2210 --- .../plotsquared/plot/generator/HybridUtils.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java index 30d7ea22f..1e37c81bd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java @@ -162,8 +162,6 @@ public abstract class HybridUtils { } else { final Runnable task = this; TaskManager.runTaskAsync(new Runnable() { - private long last = System.currentTimeMillis(); - @Override public void run() { try { if (chunks.size() < 1024) { @@ -212,11 +210,7 @@ public abstract class HybridUtils { PlotSquared.debug("&d - Potentially skipping 1024 chunks"); PlotSquared.debug("&d - TODO: recommend chunkster if corrupt"); } - GlobalBlockQueue.IMP.addTask(new Runnable() { - @Override public void run() { - TaskManager.runTaskLater(task, 20); - } - }); + GlobalBlockQueue.IMP.addTask(() -> TaskManager.runTaskLater(task, 20)); } }); } @@ -358,7 +352,7 @@ public abstract class HybridUtils { if (blocks != null) { for (int y = 0; y < blocks.length; y++) { if (blocks[y] != null) { - PlotBlock block = PlotBlock.get(blocks[y]); + BaseBlock block = blocks[y]; queue.setBlock(x + X + plotWorld.ROAD_OFFSET_X, minY + y, z + Z + plotWorld.ROAD_OFFSET_Z, block); }