mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
/ascend, /descend, and /unstuck clamp initial Y to >= 0 now.
This commit is contained in:
parent
fd86ae8f6e
commit
7106783581
@ -69,7 +69,7 @@ public class WorldEditPlayer {
|
|||||||
*/
|
*/
|
||||||
public void findFreePosition(Vector searchPos) {
|
public void findFreePosition(Vector searchPos) {
|
||||||
int x = searchPos.getBlockX();
|
int x = searchPos.getBlockX();
|
||||||
int y = searchPos.getBlockY();
|
int y = Math.max(0, searchPos.getBlockY());
|
||||||
int origY = y;
|
int origY = y;
|
||||||
int z = searchPos.getBlockZ();
|
int z = searchPos.getBlockZ();
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ public class WorldEditPlayer {
|
|||||||
public boolean ascendLevel() {
|
public boolean ascendLevel() {
|
||||||
Vector pos = getBlockIn();
|
Vector pos = getBlockIn();
|
||||||
int x = pos.getBlockX();
|
int x = pos.getBlockX();
|
||||||
int y = pos.getBlockY();
|
int y = Math.max(0, pos.getBlockY());
|
||||||
int z = pos.getBlockZ();
|
int z = pos.getBlockZ();
|
||||||
|
|
||||||
byte free = 0;
|
byte free = 0;
|
||||||
@ -153,7 +153,7 @@ public class WorldEditPlayer {
|
|||||||
public boolean descendLevel() {
|
public boolean descendLevel() {
|
||||||
Vector pos = getBlockIn();
|
Vector pos = getBlockIn();
|
||||||
int x = pos.getBlockX();
|
int x = pos.getBlockX();
|
||||||
int y = pos.getBlockY() - 1;
|
int y = Math.max(0, pos.getBlockY() - 1);
|
||||||
int z = pos.getBlockZ();
|
int z = pos.getBlockZ();
|
||||||
|
|
||||||
byte free = 0;
|
byte free = 0;
|
||||||
@ -200,8 +200,8 @@ public class WorldEditPlayer {
|
|||||||
public boolean ascendToCeiling(int clearance) {
|
public boolean ascendToCeiling(int clearance) {
|
||||||
Vector pos = getBlockIn();
|
Vector pos = getBlockIn();
|
||||||
int x = pos.getBlockX();
|
int x = pos.getBlockX();
|
||||||
int initialY = pos.getBlockY();
|
int initialY = Math.max(0, pos.getBlockY());
|
||||||
int y = pos.getBlockY() + 2;
|
int y = Math.max(0, pos.getBlockY() + 2);
|
||||||
int z = pos.getBlockZ();
|
int z = pos.getBlockZ();
|
||||||
|
|
||||||
// No free space above
|
// No free space above
|
||||||
|
Loading…
Reference in New Issue
Block a user