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.
| Field | Type | Default | Description |
|---|---|---|---|
block | Block state | required | What viewers see, like minecraft:stone or minecraft:oak_door[facing=east,half=upper]. |
x, y, z | Double | 0 | Entity action only: the position. |
relative_to | String | "self" | Entity action only: self (an offset from the entity) or world. |
viewer_condition | Condition | none | Who 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. |
recheck | Boolean | true | Re-check viewer_condition twice a second, so players start and stop seeing it. false keeps each player's first result. |
duration | Integer | 0 | Ticks 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.
{
"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.
{
"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.