c0de 0.3.0This page in English

Diese Seite ist noch nicht übersetzt. Sie wird auf Englisch angezeigt.

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

  • position STRUCT c0de/minecraft/POSITION: where the block goes
  • id STRING: the block ID, e.g. minecraft:stone
  • properties HASH STRING: block states such as facing (optional, default empty)
  • inventory STRUCT 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 ;