Stop with the checks for yaw. Useless.

This commit is contained in:
Andrew 2013-07-29 15:04:19 +12:00
parent af51d15d59
commit 95256f8d6f

View File

@ -6,7 +6,6 @@ import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@ -152,13 +151,10 @@ public class LibsDisguises extends JavaPlugin {
else if (Packets.Server.REL_ENTITY_MOVE_LOOK == event.getPacketID() else if (Packets.Server.REL_ENTITY_MOVE_LOOK == event.getPacketID()
|| Packets.Server.ENTITY_LOOK == event.getPacketID() || Packets.Server.ENTITY_LOOK == event.getPacketID()
|| Packets.Server.ENTITY_TELEPORT == event.getPacketID()) { || Packets.Server.ENTITY_TELEPORT == event.getPacketID()) {
// If the disguise needs its yaw value modified event.setPacket(event.getPacket().shallowClone());
if (disguise.getType() == DisguiseType.ENDER_DRAGON || disguise.getType().isMisc()) { StructureModifier<Object> mods = event.getPacket().getModifier();
event.setPacket(event.getPacket().shallowClone()); byte value = (Byte) mods.read(4);
StructureModifier<Object> mods = event.getPacket().getModifier(); mods.write(4, getYaw(DisguiseType.getType(entity.getType()), disguise.getType(), value));
byte value = (Byte) mods.read(4);
mods.write(4, getYaw(DisguiseType.getType(entity.getType()), disguise.getType(), value));
}
} }
} }
} catch (Exception e) { } catch (Exception e) {