Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 11:00:04 +01:00
Made handling of non-right angles in getDirection() return more relevant errors.
Dieser Commit ist enthalten in:
Ursprung
010a1c84fd
Commit
2f411fa838
@ -1701,8 +1701,12 @@ public class WorldEditController {
|
|||||||
|
|
||||||
LocalPlayer.DIRECTION dir = null;
|
LocalPlayer.DIRECTION dir = null;
|
||||||
|
|
||||||
|
dirStr = dirStr.toLowerCase();
|
||||||
|
boolean wasDetected = false;
|
||||||
|
|
||||||
if (dirStr.equals("me")) {
|
if (dirStr.equals("me")) {
|
||||||
dir = player.getCardinalDirection();
|
dir = player.getCardinalDirection();
|
||||||
|
wasDetected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirStr.charAt(0) == 'w' || dir == LocalPlayer.DIRECTION.WEST) {
|
if (dirStr.charAt(0) == 'w' || dir == LocalPlayer.DIRECTION.WEST) {
|
||||||
@ -1717,9 +1721,13 @@ public class WorldEditController {
|
|||||||
ym += 1;
|
ym += 1;
|
||||||
} else if (dirStr.charAt(0) == 'd') {
|
} else if (dirStr.charAt(0) == 'd') {
|
||||||
ym -= 1;
|
ym -= 1;
|
||||||
|
} else {
|
||||||
|
if (wasDetected) {
|
||||||
|
throw new UnknownDirectionException(dir.name());
|
||||||
} else {
|
} else {
|
||||||
throw new UnknownDirectionException(dirStr);
|
throw new UnknownDirectionException(dirStr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new Vector(xm, ym, zm);
|
return new Vector(xm, ym, zm);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren