This activator works when the player destroys the block.
To create this activator, use the command:
/react add BLOCK_BREAK <ActivatorId> [block]:
<ItemFormat(BlocksOnly!)
] [loc:
<Location>
]
Placeholder | Description |
---|---|
%block% | Broken block, represented in Item Format |
%blocktype% | Block type |
%blockdata% | Block data value |
%blocklocation% | Coordinates of the block |
%is_drop% | If there is or not a drop when the block is destroyed. If you change this temporary variable using the VAR_TEMP_SET action, you can enable or disable the drop. The possible values are: true/false |
/react add BLOCK_BREAK bb
/react add bb a CANCEL_EVENT true
BLOCK_BREAK:
bb:
block: ''
actions:
- CANCEL_EVENT=true
/react add BLOCK_BREAK bb2 block:type:CHEST
/react add bb2 a CANCEL_EVENT true
BLOCK_BREAK:
bb2:
block: type:CHEST
actions:
- CANCEL_EVENT=true
/react add BLOCK_BREAK bc3
/react add BLOCK_BREAK bb3 block:type:CHEST loc:world,100,60,100
/react add bb3 a CANCEL_EVENT true
BLOCK_BREAK:
bb3:
block: type:CHEST
location: world,100,60,100
actions:
- CANCEL_EVENT=true
location: world,100,60,100
- location of the CHEST
/react add BLOCK_BREAK bb4
/react add bb4 f COMPARE param:%blocktype% value1:DIRT value2:GRASS value3:STONE
/react add bb4 a CANCEL_EVENT true
BLOCK_BREAK:
bb4:
block: ''
flags:
- COMPARE=param:%blocktype% value1:DIRT value2:GRASS value3:STONE
actions:
- CANCEL_EVENT=true
/react add BLOCK_BREAK break_red_wool block:{type:WOOL color:RED}
/react add break_red_wool a MESSAGE &cIt was fine red wool...
BLOCK_BREAK:
break_red_wool:
block: type:WOOL color:RED
actions:
- MESSAGE=&cIt was fine red wool...