From 380857961457521801d7aa9ac4e538252b8a6326 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 19 Nov 2013 11:46:06 +1300 Subject: [PATCH] Annother attempt to fix broken look --- src/me/libraryaddict/disguise/PacketsManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/me/libraryaddict/disguise/PacketsManager.java b/src/me/libraryaddict/disguise/PacketsManager.java index 715b603b..74410398 100644 --- a/src/me/libraryaddict/disguise/PacketsManager.java +++ b/src/me/libraryaddict/disguise/PacketsManager.java @@ -1050,12 +1050,13 @@ public class PacketsManager { loc.getBlockY(), loc.getBlockZ()).createPacket(player, 0, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); } - + // TODO Fix this cos it doesn't move the disguise? + byte yaw = (byte) (loc.getYaw() * 256.0F / 360.0F); + byte pitch = (byte) (loc.getPitch() * 256.0F / 360.0F); manager.sendServerPacket( player, - manager.createPacketConstructor(Packets.Server.ENTITY_HEAD_ROTATION, player.getEntityId(), - (byte) Math.floor(loc.getYaw() * 256.0F / 360.0F)).createPacket(player.getEntityId(), - (byte) Math.floor(loc.getYaw() * 256.0F / 360.0F))); + manager.createPacketConstructor(Packets.Server.ENTITY_LOOK, player.getEntityId(), yaw, pitch).createPacket( + player.getEntityId(), yaw, pitch)); // Resend any active potion effects Iterator iterator = player.getActivePotionEffects().iterator();