Minecraft Wiki
Advertisement
Gear (item)
This article is a work in progress. 
Please help in the expansion or creation of this article by expanding or improving it. The talk page may contain suggestions.
Information icon
This feature is exclusive to Java Edition. 

Interaction entities are entities useful for map or data pack creators to see who the last player to click on a certain spot is. They can only be created with the /summon or /execute summon command.

Behavior[]

Interaction entities record the UUID of the last player that left-clicked and right-clicked them, and the time at which the interaction happened. If response is set to true, left-clicking an interaction entity plays a punching sound, and right-clicking it makes the player's arm swing.

Usage[]

You can check information on who last left-clicked and right-clicked on the interaction entity with the /data get entity command. This information can be useful in datapack and map creation. You can also change their size to match the area you want to be checked.

Data values[]

ID[]

EntityIdentifierTranslation key
Interactioninteractionentity.minecraft.interaction

Entity data[]

See also: Entity format

Interaction entities have entity data associated with them that contain various properties of the entity.

  • root tag
    • Tags common to all entities
    •  width: The width of the entities bounding box. Defaults to 1.
    •  height: The height of the entities bounding box. Defaults to 1.
    •  response: A boolean specifying whether an interaction should trigger a response. Defaults to false.
    •  attack: The last attack (left click) to hit the entity.
      •  player: The UUID of the player that attacked the entity. The 128-bit UUID is stored as four 32-bit integers, ordered from most to least significant.
      •  timestamp: When the attack took place.
    •  interaction: The last interaction (right click) to hit the entity.
      •  player: The UUID of the player that interacted with the entity. The 128-bit UUID is stored as four 32-bit integers, ordered from most to least significant.
      •  timestamp: When the interaction took place.

History[]

Java Edition
1.19.423w07aAdded Interaction.
Advertisement