Origins: Powerful Powers
» Entity actions » Set fake block

Set fake block

origins-powerful-powers:set_fake_blockentity actionblock action

Shows chosen players a different block at a position. See Fake blocks for how players interact with it.

FieldTypeDefaultDescription
blockBlock staterequiredWhat viewers see, like minecraft:stone or minecraft:oak_door[facing=east,half=upper].
x, y, zDouble0Entity action only: the position.
relative_toString"self"Entity action only: self (an offset from the entity) or world.
viewer_conditionConditionnoneWho sees it. In the entity action it's a bi-entity condition: actor the viewing player, target the entity that set it. In the block action it's an entity condition on the viewing player. Left out: everyone.
recheckBooleantrueRe-check viewer_condition twice a second, so players start and stop seeing it. false keeps each player's first result.
durationInteger0Ticks until it goes away. 0 lasts until it's cleared or the real block changes.
  • The position is fixed when the action runs.
  • Setting a fake where one already is replaces it.
  • It does nothing in an unloaded chunk.

Example: "Wall of illusion". Right-clicking a block with an empty hand makes it look like bedrock, for everyone, for 10 seconds.

json
{
  "type": "origins:action_on_block_use",
  "item_condition": {
    "type": "origins:empty"
  },
  "block_action": {
    "type": "origins-powerful-powers:set_fake_block",
    "block": "minecraft:bedrock",
    "duration": 200
  }
}

Example: as an entity action. The block under your feet looks like glass to you for 5 seconds.

json
{
  "type": "origins-powerful-powers:set_fake_block",
  "block": "minecraft:glass",
  "x": 0,
  "y": -1,
  "z": 0,
  "viewer_condition": {
    "type": "origins:equal"
  },
  "duration": 100
}

origins:equal is true when the viewer is the entity that set the block.