Skip to content

Commit f4b886d

Browse files
authored
Minor cleanup of the plot analyze code (#3708)
- 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
1 parent c09d0d8 commit f4b886d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ public void analyzeRegion(final String world, final CuboidRegion region, final R
189189
if (X == ctx) {
190190
maxX = tx & 15;
191191
} else {
192-
maxX = 16;
192+
maxX = 15;
193193
}
194194
int maxZ;
195195
if (Z == ctz) {
196196
maxZ = tz & 15;
197197
} else {
198-
maxZ = 16;
198+
maxZ = 15;
199199
}
200200

201201
int chunkBlockX = X << 4;
@@ -221,7 +221,7 @@ public void analyzeRegion(final String world, final CuboidRegion region, final R
221221
}
222222
});
223223

224-
final Runnable run = () -> TaskManager.runTaskAsync(() -> {
224+
final Runnable run = () -> {
225225
int size = width * length;
226226
int[] changes = new int[size];
227227
int[] faces = new int[size];
@@ -296,7 +296,7 @@ public void analyzeRegion(final String world, final CuboidRegion region, final R
296296
analysis.variety_sd = (int) (MathMan.getSD(variety, analysis.variety) * 100);
297297
whenDone.value = analysis;
298298
whenDone.run();
299-
});
299+
};
300300
queue.setCompleteTask(run);
301301
queue.enqueue();
302302
});

0 commit comments

Comments
 (0)