mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fix error in /up when used out of bounds.
Also reduce calls to Entity#getLocation() all over since it's more expensive than it needs to be (adapts world/vector every time).
This commit is contained in:
@ -107,7 +107,7 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.sk89q.worldedit.world.World getWorld() {
|
||||
public World getWorld() {
|
||||
return ForgeWorldEdit.inst.getWorld(this.player.world);
|
||||
}
|
||||
|
||||
@ -189,6 +189,20 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void floatAt(int x, int y, int z, boolean alwaysGlass) {
|
||||
if (alwaysGlass || !player.abilities.allowFlying) {
|
||||
super.floatAt(x, y, z, alwaysGlass);
|
||||
return;
|
||||
}
|
||||
|
||||
setPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
||||
if (!player.abilities.isFlying) {
|
||||
player.abilities.isFlying = true;
|
||||
player.sendPlayerAbilities();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
|
||||
World world = getWorld();
|
||||
|
Reference in New Issue
Block a user