summaryrefslogtreecommitdiffstats
path: root/nms-patches/ControllerLook.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/ControllerLook.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/ControllerLook.patch')
-rw-r--r--nms-patches/ControllerLook.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/nms-patches/ControllerLook.patch b/nms-patches/ControllerLook.patch
new file mode 100644
index 00000000..212d063e
--- /dev/null
+++ b/nms-patches/ControllerLook.patch
@@ -0,0 +1,23 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/ControllerLook.java 2014-11-27 08:59:46.621422199 +1100
++++ src/main/java/net/minecraft/server/ControllerLook.java 2014-11-27 08:42:10.172850872 +1100
+@@ -1,5 +1,7 @@
+ package net.minecraft.server;
+
++import org.bukkit.craftbukkit.TrigMath; // CraftBukkit
++
+ public class ControllerLook {
+
+ private EntityInsentient a;
+@@ -45,8 +47,10 @@
+ double d1 = this.f - (this.a.locY + (double) this.a.getHeadHeight());
+ double d2 = this.g - this.a.locZ;
+ double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
+- float f = (float) (Math.atan2(d2, d0) * 180.0D / 3.1415927410125732D) - 90.0F;
+- float f1 = (float) (-(Math.atan2(d1, d3) * 180.0D / 3.1415927410125732D));
++ // CraftBukkit start - Math -> TrigMath
++ float f = (float) (TrigMath.atan2(d2, d0) * 180.0D / 3.1415927410125732D) - 90.0F;
++ float f1 = (float) (-(TrigMath.atan2(d1, d3) * 180.0D / 3.1415927410125732D));
++ // CraftBukkit end
+
+ this.a.pitch = this.a(this.a.pitch, f1, this.c);
+ this.a.aI = this.a(this.a.aI, f, this.b);