From 01df80e46e67e712fb6778bfbcdb1a929eef5fc5 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 18 Jul 2017 20:15:06 +1200 Subject: [PATCH] Fixed player spawning not using the proper yaw/pitch --- .../libraryaddict/disguise/utilities/PacketsManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index 5d1e9ab0..784ac464 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -340,8 +340,8 @@ public class PacketsManager { doubles.write(2, spawnAt.getZ()); StructureModifier bytes = spawnPlayer.getBytes(); - bytes.write(0, ((byte) (int) (loc.getYaw() * 256.0F / 360.0F))); - bytes.write(1, ((byte) (int) (loc.getPitch() * 256.0F / 360.0F))); + bytes.write(0, yaw); + bytes.write(1, pitch); spawnPlayer.getDataWatcherModifier().write(0, newWatcher); @@ -372,8 +372,8 @@ public class PacketsManager { doubles.write(2, loc.getZ()); bytes = teleportPacket.getBytes(); - bytes.write(0, ((byte) (int) (loc.getYaw() * 256.0F / 360.0F))); - bytes.write(1, ((byte) (int) (loc.getPitch() * 256.0F / 360.0F))); + bytes.write(0, yaw); + bytes.write(1, pitch); packets.addPacket(teleportPacket); }