Origins: Powerful Powers
» Entity actions » Fake blocks power

Fake blocks power

origins-powerful-powers:fake_blockspower type

While the holder has this power, blocks near them look different. It has two modes, and one power can use both.

FieldTypeDefaultDescription
blockBlock staterequiredWhat the matching blocks look like.
block_conditionBlock conditionnoneReplace mode: every real block within radius of the holder matching this condition is shown as block.
radiusInteger8Replace mode only. Capped at 16.
offsetsArray of {x, y, z}noneOffset mode: positions relative to the holder, which move with them.
rotate_with_facingBooleanfalseOffset mode: turn the offsets with the holder's facing, like ^ ^ ^ in commands (x left, y up, z forward).
show_to_holderBooleantrueWhether the holder sees them.
viewer_conditionBi-entity conditionnoneOther players who also see them: actor the viewing player, target the holder. Left out: nobody else.
intervalInteger10Ticks between recomputes.
  • viewer_condition adds other viewers besides the holder.
  • Cost: replace mode checks every block in the cube each recompute. Radius 8 is about 4,900 blocks and radius 16 about 35,900. Raise interval for a big radius.
  • When the power's condition is false, the blocks go back to normal within a couple of seconds.

Example: "Ore sight". While the power is active, stone within 8 blocks looks like glass.

json
{
  "type": "origins-powerful-powers:fake_blocks",
  "block": "minecraft:glass",
  "block_condition": {
    "type": "origins:block",
    "block": "minecraft:stone"
  },
  "radius": 8,
  "interval": 20
}

Example: a ghost wall two blocks in front of you, that only other players see.

json
{
  "type": "origins-powerful-powers:fake_blocks",
  "block": "minecraft:cobweb",
  "offsets": [
    {
      "x": 0,
      "y": 0,
      "z": 2
    },
    {
      "x": 0,
      "y": 1,
      "z": 2
    }
  ],
  "rotate_with_facing": true,
  "show_to_holder": false,
  "viewer_condition": {
    "type": "origins:distance",
    "comparison": "<=",
    "compare_to": 16
  }
}