Delay head rotate packet for paper users to try avoid xray issue
This commit is contained in:
		| @@ -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<Object> mods = rotateHead.getModifier(); | ||||
|  | ||||
|             if (!DisguiseUtilities.isRunningPaper()) { | ||||
|                 packets.addPacket(rotateHead); | ||||
|             } else { | ||||
|                 packets.addDelayedPacket(rotateHead, 10); | ||||
|             } | ||||
|  | ||||
|             mods.write(0, disguisedEntity.getEntityId()); | ||||
|             mods.write(1, yaw); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user