Send rel look for 1.15 head rotation packet
This commit is contained in:
parent
f28e520b09
commit
7c89c9ca50
@ -24,7 +24,10 @@ public class PacketHandlerHeadRotation implements IPacketHandler {
|
||||
@Override
|
||||
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
|
||||
Entity entity) {
|
||||
if (disguise.getType().isPlayer() && entity.getType() != EntityType.PLAYER) {
|
||||
if (!disguise.getType().isPlayer() || entity.getType() == EntityType.PLAYER) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location loc = entity.getLocation();
|
||||
|
||||
byte pitch = DisguiseUtilities
|
||||
@ -38,7 +41,7 @@ public class PacketHandlerHeadRotation implements IPacketHandler {
|
||||
mods.write(0, entity.getEntityId());
|
||||
mods.write(1, yaw);
|
||||
|
||||
PacketContainer look = new PacketContainer(PacketType.Play.Server.ENTITY_LOOK);
|
||||
PacketContainer look = new PacketContainer(PacketType.Play.Server.REL_ENTITY_MOVE_LOOK);
|
||||
|
||||
look.getIntegers().write(0, entity.getEntityId());
|
||||
look.getBytes().write(0, yaw);
|
||||
@ -50,4 +53,3 @@ public class PacketHandlerHeadRotation implements IPacketHandler {
|
||||
packets.addPacket(rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user