From 07edf3d365785f6205aa629d42ab0b2bcb7eda84 Mon Sep 17 00:00:00 2001 From: zml Date: Wed, 22 Jul 2015 00:08:36 -0700 Subject: [PATCH] Fix swapping of pitch and yaw in setLocation Also use rotation(Pitch|Yaw) in getLocation for consistency with getPitch and getYaw. --- .../main/java/com/sk89q/worldedit/forge/ForgePlayer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java index b84a53741..05153adeb 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java @@ -81,8 +81,8 @@ public class ForgePlayer extends AbstractPlayerActor { return new Location( ForgeWorldEdit.inst.getWorld(this.player.worldObj), position, - this.player.cameraYaw, - this.player.cameraPitch); + this.player.rotationYaw, + this.player.rotationPitch); } @Override @@ -150,12 +150,11 @@ public class ForgePlayer extends AbstractPlayerActor { component.getChatStyle().setColor(formatting); this.player.addChatMessage(component); } - } @Override public void setPosition(Vector pos, float pitch, float yaw) { - this.player.playerNetServerHandler.setPlayerLocation(pos.getX(), pos.getY(), pos.getZ(), pitch, yaw); + this.player.playerNetServerHandler.setPlayerLocation(pos.getX(), pos.getY(), pos.getZ(), yaw, pitch); } @Override