Skip to content

Activator DAMAGE_BY_BLOCK

MaxDikiy edited this page Jul 24, 2017 · 1 revision

This activator works when the player receives damage from the block.

To create this activator, use the command:

/react add DAMAGE_BY_BLOCK <ActivatorId> <ItemFormat(BlocksOnly!)] [loc:<Location>] [cause:<type>]

Temporary placeholders operating in this activator:

Placeholder Description
%damage% Damage the will deal to mob. You can modify this temporary variable using VAR_TEMP_SET action to change value of player damage
%block% Broken block, represented in Item Format
%blocktype% Block type
%blockdata% Block data value
%blocklocation% Coordinates of the block
%cause% Damage cause

Examples

  1. We will forbid to damage the player with the block (try to walk on the block of Magma):
    /react add DAMAGE_BY_BLOCK dbb
    /react add dbb a CANCEL_EVENT true
    or
DAMAGE_BY_BLOCK:
  dbb:
    block: ''
    cause: ANY
    flags: []
    actions:
    - 'MESSAGE=Damage: %damage%'
    - 'MESSAGE=blocklocation: %blocklocation%'
    - 'MESSAGE=blocktype: %blocktype%'
    - 'MESSAGE=blockdata: %blockdata%'
    - 'MESSAGE=block: %block%'
    - 'MESSAGE=Cause: %cause%'
    - CANCEL_EVENT=true
    reactions: []
Clone this wiki locally