GET_BLOCK
Reads the block at a position.
You get its ID, its block state properties as text, the redstone power it receives and whether it has an inventory. An unloaded chunk raises CHUNK_NOT_LOADED. An empty dimension in the position means the dimension of the trigger block.
Parameters and results
positionSTRUCT c0de/minecraft/POSITION: where the block is- result
idSTRING: the block ID, e.g. minecraft:oak_door - result
propertiesHASH STRING: the block states, e.g. facing is north - result
powerINTEGER: the redstone power it receives, 0 to 15 - result
has_inventoryBOOLEAN: true for blocks with an inventory, such as chests; GET_INVENTORY, MOVE_ITEMS and DELETE_ITEMS work with them
Example
c0de
CALL c0de/minecraft/GET_BLOCK
PARAMETER position spot ;
RESULT id blockId
RESULT properties states
RESULT power power
RESULT has_inventory isChest