Fixed player spawning not using the proper yaw/pitch

This commit is contained in:
libraryaddict 2017-07-18 20:15:06 +12:00
parent d0e91be090
commit 01df80e46e

View File

@ -340,8 +340,8 @@ public class PacketsManager {
doubles.write(2, spawnAt.getZ());
StructureModifier<Byte> 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);
}