summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-10-09 23:23:00 +0200
committersnowleo <schneeleo@gmail.com>2011-10-09 23:23:00 +0200
commit164070b4879b67d49acd765e1ece7fe5c74dc575 (patch)
tree0c38f8ee8de11ccd86e06e6241fdf8d4a323c313
parentd658c75cecb0c08f11cae017070e72597af44a72 (diff)
downloadEssentials-164070b4879b67d49acd765e1ece7fe5c74dc575.tar
Essentials-164070b4879b67d49acd765e1ece7fe5c74dc575.tar.gz
Essentials-164070b4879b67d49acd765e1ece7fe5c74dc575.tar.lz
Essentials-164070b4879b67d49acd765e1ece7fe5c74dc575.tar.xz
Essentials-164070b4879b67d49acd765e1ece7fe5c74dc575.zip
Notch decided that the sun rises north and sets south.
"Corrected" values for /getpos and /compass
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerExtension.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandcompass.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java2
3 files changed, 2 insertions, 11 deletions
diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
index ef63dacc3..9555bb1a7 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
@@ -16,15 +16,6 @@ public class PlayerExtension extends PlayerWrapper
super(base);
this.ess = ess;
}
-
- public float getCorrectedYaw()
- {
- float angle = (getLocation().getYaw() - 90.0f) % 360.0f;
- if (angle < 0) {
- angle += 360.0f;
- }
- return angle;
- }
public void showInventory(IInventory inventory)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java b/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
index bd07c2b9b..8d582a296 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
@@ -15,7 +15,7 @@ public class Commandcompass extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- int r = (int)user.getCorrectedYaw();
+ int r = (int)user.getLocation().getYaw();
String dir;
if (r < 23) dir = "N";
else if (r < 68) dir = "NE";
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
index bf5cff75d..12eeb5182 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
@@ -19,7 +19,7 @@ public class Commandgetpos extends EssentialsCommand
user.sendMessage("§7X: " + coords.getBlockX() + " (-North <-> +South)");
user.sendMessage("§7Y: " + coords.getBlockY() + " (+Up <-> -Down)");
user.sendMessage("§7Z: " + coords.getBlockZ() + " (+East <-> -West)");
- user.sendMessage("§7Yaw: " + user.getCorrectedYaw() + " (Rotation)");
+ user.sendMessage("§7Yaw: " + coords.getYaw() + " (Rotation)");
user.sendMessage("§7Pitch: " + coords.getPitch() + " (Head angle)");
}
}