Activator ENTITY_CLICK

This activator is initiated when the player right-click on the entity (Entity). With this activator, you can prevent objects from being framed or objects in the frame. To forbid to board a boat, minecart and horse. And much more.

To create this activator, use the command:

/react add ENTITY_CLICK <ActivatorId> [type:<EntityType>]


Temporary placeholders operating in this activator:

PlaceholderDescription
%entitytype%Entity Type

Examples

  1. Output the type of Entity, by which we click:
    /react add ENTITY_CLICK ec
    /react add ec a MESSAGE %entitytype%
    or
ENTITY_CLICK:
    ec:
      entity-type: ''
      actions:
      - 'MESSAGE=Entity: %entitytype%'
  1. We will forbid to get into the boat:
    /react add ENTITY_CLICK ec2 type:BOAT
    /react add ec2 a CANCEL_EVENT true
    or
ENTITY_CLICK:
  ec2:
    entity-type: BOAT
    actions:
    - CANCEL_EVENT=true
  1. We will forbid to insert in a frame items, or to rotate items in a frame:
    /react add ENTITY_CLICK ec3 type:ITEM_FRAME
    /react add ec3 a CANCEL_EVENT true
    or
ENTITY_CLICK:
  ec3:
    entity-type: ITEM_FRAME
    actions:
    - CANCEL_EVENT=true
  1. We will forbid to insert in a frame a certain item:
    /react add ENTITY_CLICK ec4 type:ITEM_FRAME
    /react add ec4 f ITEM type:TRIPWIRE_HOOK
    /react add ec4 a CANCEL_EVENT true
    или
ENTITY_CLICK:
  ec4:
    entity-type: ITEM_FRAME
    flags:
    - ITEM=type:TRIPWIRE_HOOK
    actions:
    - CANCEL_EVENT=true