Use BaseBlocks in regenallroads and minor cleanup of HybridUtils.

Fixes #2210
This commit is contained in:
dordsor21 2018-12-31 16:08:09 +00:00
parent 3156741664
commit 8c52e20736

View File

@ -162,8 +162,6 @@ public abstract class HybridUtils {
} else { } else {
final Runnable task = this; final Runnable task = this;
TaskManager.runTaskAsync(new Runnable() { TaskManager.runTaskAsync(new Runnable() {
private long last = System.currentTimeMillis();
@Override public void run() { @Override public void run() {
try { try {
if (chunks.size() < 1024) { if (chunks.size() < 1024) {
@ -212,11 +210,7 @@ public abstract class HybridUtils {
PlotSquared.debug("&d - Potentially skipping 1024 chunks"); PlotSquared.debug("&d - Potentially skipping 1024 chunks");
PlotSquared.debug("&d - TODO: recommend chunkster if corrupt"); PlotSquared.debug("&d - TODO: recommend chunkster if corrupt");
} }
GlobalBlockQueue.IMP.addTask(new Runnable() { GlobalBlockQueue.IMP.addTask(() -> TaskManager.runTaskLater(task, 20));
@Override public void run() {
TaskManager.runTaskLater(task, 20);
}
});
} }
}); });
} }
@ -358,7 +352,7 @@ public abstract class HybridUtils {
if (blocks != null) { if (blocks != null) {
for (int y = 0; y < blocks.length; y++) { for (int y = 0; y < blocks.length; y++) {
if (blocks[y] != null) { if (blocks[y] != null) {
PlotBlock block = PlotBlock.get(blocks[y]); BaseBlock block = blocks[y];
queue.setBlock(x + X + plotWorld.ROAD_OFFSET_X, minY + y, queue.setBlock(x + X + plotWorld.ROAD_OFFSET_X, minY + y,
z + Z + plotWorld.ROAD_OFFSET_Z, block); z + Z + plotWorld.ROAD_OFFSET_Z, block);
} }