Skip to content

Interact with Entity ​

Packet IDDirectionMojang NameMCP Name
0x07ServerboundInteractPacketPacket7UseEntity

This is sent by the client when a player attacks or interacts with an entity. The server should only accept this packet if the entity is not obstructed and is within 3 blocks of the player.

Serverbound ​

FieldTypeDescription
Player IDIntegerThe ID of the player who clicked the entity
Entity IDIntegerThe ID of the entity that was clicked
Attack?BooleanWhether the player is attacking or interacting

Example Packet ​

FieldValue
Player ID1298
Entity ID1805
Attack?true