mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fixed /ceil.
This commit is contained in:
parent
ebf5b97451
commit
d63c8c113c
@ -287,11 +287,11 @@ public abstract class WorldEditPlayer {
|
||||
public boolean ascendToCeiling(int clearance) {
|
||||
Vector pos = getBlockIn();
|
||||
int x = pos.getBlockX();
|
||||
int initialY = pos.getBlockY();
|
||||
int y = pos.getBlockY() + 2;
|
||||
int initialY = y;
|
||||
int z = pos.getBlockZ();
|
||||
|
||||
// Nothing above
|
||||
// No free space above
|
||||
if (server.getBlockType(new Vector(x, y, z)) != 0) {
|
||||
return false;
|
||||
}
|
||||
@ -299,10 +299,10 @@ public abstract class WorldEditPlayer {
|
||||
while (y <= 127) {
|
||||
// Found a ceiling!
|
||||
if (server.getBlockType(new Vector(x, y, z)) != 0) {
|
||||
int platformY = Math.max(initialY, y - 3);
|
||||
int platformY = Math.max(initialY, y - 3 - clearance);
|
||||
server.setBlockType(new Vector(x, platformY, z),
|
||||
BlockType.GLASS.getID());
|
||||
setPosition(new Vector(x, platformY + 1, z));
|
||||
setPosition(new Vector(x + 0.5, platformY + 1, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user