Delay head rotate packet for paper users to try avoid xray issue
This commit is contained in:
parent
ece93e7145
commit
2d53fdadd0
@ -386,10 +386,15 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
|||||||
|
|
||||||
if (packets.getPackets().size() <= 1 || disguise.isPlayerDisguise()) {
|
if (packets.getPackets().size() <= 1 || disguise.isPlayerDisguise()) {
|
||||||
PacketContainer rotateHead = new PacketContainer(PacketType.Play.Server.ENTITY_HEAD_ROTATION);
|
PacketContainer rotateHead = new PacketContainer(PacketType.Play.Server.ENTITY_HEAD_ROTATION);
|
||||||
packets.addPacket(rotateHead);
|
|
||||||
|
|
||||||
StructureModifier<Object> mods = rotateHead.getModifier();
|
StructureModifier<Object> mods = rotateHead.getModifier();
|
||||||
|
|
||||||
|
if (!DisguiseUtilities.isRunningPaper()) {
|
||||||
|
packets.addPacket(rotateHead);
|
||||||
|
} else {
|
||||||
|
packets.addDelayedPacket(rotateHead, 10);
|
||||||
|
}
|
||||||
|
|
||||||
mods.write(0, disguisedEntity.getEntityId());
|
mods.write(0, disguisedEntity.getEntityId());
|
||||||
mods.write(1, yaw);
|
mods.write(1, yaw);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user