From 8b41342508d6a9482aef46bc3328c1aea61f8d67 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 22 Jun 2022 14:02:48 +0100 Subject: [PATCH] Minor cleanup of the plot analyze code - No need to wrap the final analysis into another async method. It's already contained in an async task - Don't overstretch a chunk bounday when setting blocks to newBlocks array --- .../java/com/plotsquared/core/generator/HybridUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java b/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java index fcfbe1bf8..cc00345bd 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java @@ -189,13 +189,13 @@ public class HybridUtils { if (X == ctx) { maxX = tx & 15; } else { - maxX = 16; + maxX = 15; } int maxZ; if (Z == ctz) { maxZ = tz & 15; } else { - maxZ = 16; + maxZ = 15; } int chunkBlockX = X << 4; @@ -221,7 +221,7 @@ public class HybridUtils { } }); - final Runnable run = () -> TaskManager.runTaskAsync(() -> { + final Runnable run = () -> { int size = width * length; int[] changes = new int[size]; int[] faces = new int[size]; @@ -296,7 +296,7 @@ public class HybridUtils { analysis.variety_sd = (int) (MathMan.getSD(variety, analysis.variety) * 100); whenDone.value = analysis; whenDone.run(); - }); + }; queue.setCompleteTask(run); queue.enqueue(); });