0x02 C02PacketUseEntity

Player interacts with (attacks or right-clicks) an entity.

Serverbound (Client → Server) · PLAY · net/minecraft/network/play/client/C02PacketUseEntity.java
entityplayerinteractattackcombat

Fields

FieldTypeDescription
entityIdVarIntTarget entity ID
actionEnumINTERACT, ATTACK, or INTERACT_AT
hitVec(float,float,float)Target position on the entity (for INTERACT_AT)

Wire Encoding

FieldTypeNotes
Entity IDVarInt
TypeVarInt Enum0=INTERACT, 1=ATTACK, 2=INTERACT_AT
Hit X (if INTERACT_AT)float
Hit Y (if INTERACT_AT)float
Hit Z (if INTERACT_AT)float

MCP References

MCPNetHandlerPlayServer.processUseEntity()

Handler Interface

HNDINetHandlerPlayServer

Notes

ATTACK sends damage to the target entity. INTERACT opens inventory/rides. INTERACT_AT is for hitting specific entity hitboxes (like Armor Stand limbs).

implementation Implementation Cases

KillAura (Tenacity 5.1, Sigma 3.9, Gugustus, Mint B1, Koks v1, Ketamine v5.7, Lycoris 2.0, Slice v15, Jigsaw 0.24)

Send ATTACK action on target entities. Criticals intercept and inject C04 offset packets before the attack. NoDamageFriends cancels attacks on friend entities. AutoClicker sends attacks on mouse-over entities.

Vanilla hook: EventSendPacket / onTick + attackEntity
AutoClicker (Tenacity 5.1, Sigma 3.9, Gugustus, Mint B1, Koks v1, Ketamine v5.7, Lycoris 2.0, Slice v15, Jigsaw 0.24)

Send ATTACK action on target entities. Criticals intercept and inject C04 offset packets before the attack. NoDamageFriends cancels attacks on friend entities. AutoClicker sends attacks on mouse-over entities.

Vanilla hook: EventSendPacket / onTick + attackEntity
NoDamageFriends (Tenacity 5.1, Sigma 3.9, Gugustus, Mint B1, Koks v1, Ketamine v5.7, Lycoris 2.0, Slice v15, Jigsaw 0.24)

Send ATTACK action on target entities. Criticals intercept and inject C04 offset packets before the attack. NoDamageFriends cancels attacks on friend entities. AutoClicker sends attacks on mouse-over entities.

Vanilla hook: EventSendPacket / onTick + attackEntity
Criticals (Tenacity 5.1, Sigma 3.9, Gugustus, Mint B1, Koks v1, Ketamine v5.7, Lycoris 2.0, Slice v15, Jigsaw 0.24)

Send ATTACK action on target entities. Criticals intercept and inject C04 offset packets before the attack. NoDamageFriends cancels attacks on friend entities. AutoClicker sends attacks on mouse-over entities.

Vanilla hook: EventSendPacket / onTick + attackEntity
TriggerBot (Tenacity 5.1, Sigma 3.9, Gugustus, Mint B1, Koks v1, Ketamine v5.7, Lycoris 2.0, Slice v15, Jigsaw 0.24)

Send ATTACK action on target entities. Criticals intercept and inject C04 offset packets before the attack. NoDamageFriends cancels attacks on friend entities. AutoClicker sends attacks on mouse-over entities.

Vanilla hook: EventSendPacket / onTick + attackEntity
← Back to all packets