c0de 0.3.0This page in English

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

MOVE_ITEMS ​

Moves items from one inventory to another.

It moves up to count items and returns how many were moved. This needs allowInventoryChanges or an administrator as owner, otherwise PERMISSION_DENIED is raised. Blocks without inventory raise INVALID_ARGUMENT.

Parameters and results

  • from STRUCT c0de/minecraft/POSITION: the block to take items from
  • to STRUCT c0de/minecraft/POSITION: the block to put items into
  • id STRING: the item ID, e.g. minecraft:wheat
  • count INTEGER: the most items to move
  • result result INTEGER: the number of moved items

Example

c0de
CALL c0de/minecraft/MOVE_ITEMS
    PARAMETER from farmChest ;
    PARAMETER to storage ;
    PARAMETER id "minecraft:wheat" ;
    PARAMETER count 64 ;
    RESULT result moved