mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
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
This commit is contained in:
parent
c09d0d882e
commit
8b41342508
@ -189,13 +189,13 @@ public class HybridUtils {
|
|||||||
if (X == ctx) {
|
if (X == ctx) {
|
||||||
maxX = tx & 15;
|
maxX = tx & 15;
|
||||||
} else {
|
} else {
|
||||||
maxX = 16;
|
maxX = 15;
|
||||||
}
|
}
|
||||||
int maxZ;
|
int maxZ;
|
||||||
if (Z == ctz) {
|
if (Z == ctz) {
|
||||||
maxZ = tz & 15;
|
maxZ = tz & 15;
|
||||||
} else {
|
} else {
|
||||||
maxZ = 16;
|
maxZ = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
int chunkBlockX = X << 4;
|
int chunkBlockX = X << 4;
|
||||||
@ -221,7 +221,7 @@ public class HybridUtils {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final Runnable run = () -> TaskManager.runTaskAsync(() -> {
|
final Runnable run = () -> {
|
||||||
int size = width * length;
|
int size = width * length;
|
||||||
int[] changes = new int[size];
|
int[] changes = new int[size];
|
||||||
int[] faces = 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);
|
analysis.variety_sd = (int) (MathMan.getSD(variety, analysis.variety) * 100);
|
||||||
whenDone.value = analysis;
|
whenDone.value = analysis;
|
||||||
whenDone.run();
|
whenDone.run();
|
||||||
});
|
};
|
||||||
queue.setCompleteTask(run);
|
queue.setCompleteTask(run);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user