Too Many Attributes
» Entity actions » Zone

Zone

too-many-attributes:zoneentity actionblock action

Runs a block action on every block in a box, sphere or cylinder. Use it with set_fake_block for ghost blocks over an area, or with play_block_crack to crack a whole area. Any block action works, Origins' own included.

The zone is centered on the entity's block (entity action) or the block the action runs on (block action).

FieldTypeDefaultDescription
block_actionBlock actionrequiredWhat runs on each block.
block_conditionBlock conditionnoneOnly blocks matching this get block_action. Checked when each block's turn comes.
shapeString"box"box, sphere or cylinder.
from, to{x, y, z}noneBox: two corners, offsets from the center, both included, like /fill. Left out: a cube reaching radius blocks each way.
radiusDouble1Box without corners, sphere and cylinder: how far the shape reaches from the center.
radius_x, radius_y, radius_zDoublenoneBox and sphere: a different radius on one axis. A sphere with different radii is stretched into an ellipsoid.
heightInteger1Cylinder: its length in blocks. It starts at the center block and runs along axis in the positive direction.
axisString"y"Cylinder: x, y or z. y stands it upright, x and z lay it on its side like a tunnel.
hollowInteger0Keep only the outer shell, this many blocks thick. 0 is solid.
x, y, zInteger0Move the center by this many blocks.
rotateBooleanfalseEntity action only: turn the zone with the entity's facing, like ^ ^ ^ in commands (x left, y up, z forward). It snaps to the nearest of north, south, east and west.
limitInteger4096The most blocks it runs on. The blocks nearest the center go first, so a zone over the limit becomes a smaller version of the shape.
per_tickInteger1024Blocks handled each tick. A bigger zone carries on over the next ticks. 0 does every block at once.
  • Sizes: radius 1 is a 3×3×3 cube for box. For sphere it's the same cube without its 8 corners. Radii count half a block extra, like WorldEdit, so spheres look round.
  • Hollow shapes are closed. A hollow box or sphere is a shell with nothing inside. A hollow cylinder has a top and bottom.
  • Unloaded chunks are skipped. The zone never loads chunks.
  • A zone whose bounding box holds more than 2,000,000 blocks does nothing, and the server log says so.
  • Zones in progress stop when the server restarts.

Example: "Ghost dome". A hollow glass sphere with radius 6 around you, filling only the air, for 10 seconds. Everyone sees it.

json
{
  "type": "too-many-attributes:zone",
  "shape": "sphere",
  "radius": 6,
  "hollow": 1,
  "block_condition": {
    "type": "origins:block",
    "block": "minecraft:air"
  },
  "block_action": {
    "type": "too-many-attributes:set_fake_block",
    "block": "minecraft:glass",
    "duration": 200
  }
}

Inside a zone, set_fake_block runs as a block action, so its viewer_condition only sees the viewing player. To show a zone to one player, give that player a scoreboard tag and check the tag in viewer_condition.

Example: "Quake". Right-clicking a block with an empty hand cracks every block in a 7×3×7 box under it over 2 seconds. The blocks don't break.

json
{
  "type": "origins:action_on_block_use",
  "item_condition": {
    "type": "origins:empty"
  },
  "block_action": {
    "type": "too-many-attributes:zone",
    "from": { "x": -3, "y": -2, "z": -3 },
    "to": { "x": 3, "y": 0, "z": 3 },
    "block_action": {
      "type": "too-many-attributes:play_block_crack",
      "duration": 40
    }
  }
}

Example: "Tunnel vision". A 9-block tunnel of fake air in front of you, radius 1, lasting 5 seconds.

json
{
  "type": "too-many-attributes:zone",
  "shape": "cylinder",
  "axis": "z",
  "radius": 1,
  "height": 9,
  "y": 1,
  "z": 1,
  "rotate": true,
  "block_action": {
    "type": "too-many-attributes:set_fake_block",
    "block": "minecraft:air",
    "duration": 100
  }
}