execute command minecraft bedrock code example
Example: execute if block
(if|unless) block
Compares the block at a given position to a given block ID
Syntax
(if|unless) block <pos> <block> -> [execute]
Arguments
<pos>: block_pos
Position of a target block to test
<block>: block_predicate
A valid block ID (or predicate) to test for
Block ID optionally followed by block states (bounded by brackets – []) and/or data tags (bounded by braces – {})