3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 11:00:04 +01:00

Don't allow area pickaxe outside max y

#1331
Dieser Commit ist enthalten in:
dordsor21 2021-09-30 13:16:15 +01:00
Ursprung c10e48320b
Commit 7a6a0f68fe
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -64,10 +64,11 @@ public class AreaPickaxe implements BlockTool {
try (EditSession editSession = session.createEditSession(player, "AreaPickaxe")) { try (EditSession editSession = session.createEditSession(player, "AreaPickaxe")) {
editSession.getSurvivalExtent().setToolUse(config.superPickaxeManyDrop); editSession.getSurvivalExtent().setToolUse(config.superPickaxeManyDrop);
int maxY = editSession.getMaxY();
try { try {
for (int x = ox - range; x <= ox + range; ++x) { for (int x = ox - range; x <= ox + range; ++x) {
for (int y = oy - range; y <= oy + range; ++y) { for (int y = oy - range; y <= oy + range && y <= maxY; ++y) {
for (int z = oz - range; z <= oz + range; ++z) { for (int z = oz - range; z <= oz + range; ++z) {
if (!initialType.equals(editSession.getBlock(x, y, z).getBlockType())) { if (!initialType.equals(editSession.getBlock(x, y, z).getBlockType())) {
continue; continue;