Fix SelectAdjacent but make it a touch slower

This commit is contained in:
2025-07-31 16:25:05 +02:00
parent 33e9b3409f
commit 8076f31a19
2 changed files with 10 additions and 10 deletions
@@ -112,12 +112,12 @@ public class SelectAdjacent implements Listener {
FlatteningWrapper.impl.setSelection(player, minPoint, maxPoint);
WorldEditRenderer.renderPlayer(player);
boolean finished = toCalc.stream().allMatch(location -> {
return location.getBlockX() >= minX && location.getBlockY() >= minY && location.getBlockZ() >= minZ &&
location.getBlockX() <= maxX && location.getBlockY() <= maxY && location.getBlockZ() <= maxZ;
});
// boolean finished = toCalc.stream().allMatch(location -> {
// return location.getBlockX() >= minX && location.getBlockY() >= minY && location.getBlockZ() >= minZ &&
// location.getBlockX() <= maxX && location.getBlockY() <= maxY && location.getBlockZ() <= maxZ;
// });
if (finished || seen.size() > MAX_BLOCKS) {
if (toCalc.isEmpty() || seen.size() > MAX_BLOCKS) {
bukkitTask.cancel();
player.sendTitle("§aDone", "§e" + volume + " §7Blocks", 0, 20, 5);
}