PLACE_BLOCK
Places a block at a position.
The position must hold air or a replaceable block like grass or water, otherwise INVALID_ARGUMENT is raised. Without inventory, this needs allowBlockChanges or an administrator as owner, otherwise PERMISSION_DENIED is raised.
With inventory, the block is taken from that inventory, like a player places a block from theirs, and every owner may do that. If the inventory doesn't contain the block, ITEM_MISSING is raised.
Parameters and results
positionSTRUCT c0de/minecraft/POSITION: where the block goesidSTRING: the block ID, e.g. minecraft:stonepropertiesHASH STRING: block states such as facing (optional, default empty)inventorySTRUCT c0de/minecraft/POSITION: a chest or another block with an inventory that the block is taken from (optional)
Example
c0de
CALL c0de/minecraft/PLACE_BLOCK
PARAMETER position spot ;
PARAMETER id "minecraft:torch" ;
PARAMETER inventory chest ;