From 2d53fdadd07203f3b0904a853f953df2160a8c42 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 4 Jun 2020 16:57:28 +1200 Subject: [PATCH] Delay head rotate packet for paper users to try avoid xray issue --- .../packets/packethandlers/PacketHandlerSpawn.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java index d1ea186a..68eb555a 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java @@ -386,10 +386,15 @@ public class PacketHandlerSpawn implements IPacketHandler { if (packets.getPackets().size() <= 1 || disguise.isPlayerDisguise()) { PacketContainer rotateHead = new PacketContainer(PacketType.Play.Server.ENTITY_HEAD_ROTATION); - packets.addPacket(rotateHead); StructureModifier mods = rotateHead.getModifier(); + if (!DisguiseUtilities.isRunningPaper()) { + packets.addPacket(rotateHead); + } else { + packets.addDelayedPacket(rotateHead, 10); + } + mods.write(0, disguisedEntity.getEntityId()); mods.write(1, yaw); }