Origins: Powerful Powers
» Entity actions » Play block crack

Play block crack

origins-powerful-powers:play_block_crackblock action

Shows the mining crack overlay on a block, stepping from stage 0 to 9 over a set time. The block itself only changes when on_finish is break.

It goes wherever Origins takes a block action: origins:block_action_at (the block at an entity's position), a raycast's block_action, origins:action_on_block_use, and so on.

FieldTypeDefaultDescription
durationInteger20Ticks from stage 0 to the end of stage 9.
on_finishString"clear"What happens when the time is up. clear: the overlay goes away. hold: it stays at full crack until the block changes or you run this action with clear. break: the block breaks, with the breaking sound and particles.
drop_itemsBooleantrueWith on_finish: break: whether the block drops its items.
clearBooleanfalseWhen true, this call stops any crack running or held at the block and removes the overlay.
  • One crack per block. While a crack is running or held at a block, starting another one there does nothing.
  • It stops early and removes the overlay if the block changes or its chunk unloads.
  • Who sees it: players in that dimension within 32 blocks. Each stage is sent when it starts, so a player who walks into range sees it from the next stage.
  • It does nothing on air.
  • Cracks stop when the server restarts.

Example: "Rot touch". Right-clicking a block with an empty hand makes it decay and break over 3 seconds.

json
{
  "type": "origins:action_on_block_use",
  "item_condition": {
    "type": "origins:empty"
  },
  "block_action": {
    "type": "origins-powerful-powers:play_block_crack",
    "duration": 60,
    "on_finish": "break"
  }
}