Skip to content

Actions

Dan Alexander edited this page Nov 3, 2026 · 1 revision

Content actions

Reusable item and placed-block actions supported by the content runtime.

Documentation for VoxelCore v1.0.0. Home · Installation · Compatibility

Actions

Items and blocks can declare reusable event actions. For example, a 2D ore item can place its corresponding block:

items:
  ruby_ore:
    material: minecraft:paper
    render:
      model: mypack:item/ruby_ore
    events:
      interact:
        right:
          actions:
            - type: set_block
              block: ruby_ore
              target: relative
              replace: air_only
              consume: 1

Item triggers are interact.right, interact.right_shift, interact.left, and interact.left_shift. Block triggers are placed_block.interact and placed_block.break.

Available actions are:

  • set_block: block, optional target (relative, clicked, or target), replace, and consume
  • remove_block: optional target
  • command: command and optional executor (player or console)
  • give_item / drop_item: item and optional amount
  • message: text
  • cancel

Command and message strings support {player}, {player_uuid}, {world}, {x}, {y}, {z}, {item_id}, and {block_id} placeholders. Unknown action keys and missing content references fail validation rather than being ignored.

Clone this wiki locally