Offset (Meta Condition Type)
Tests a block condition at a position offset from this one.
Tests a block condition at a position offset from the one being checked. This is a block condition only — it has no entity or item equivalent, because only block conditions have a position to offset from.
Type ID: apoli:offset
Fields
| Field | Type | Default | Description |
|---|---|---|---|
condition | Block Condition | required | The condition to test at the offset position. |
x | Integer | 0 | Blocks east. |
y | Integer | 0 | Blocks up. |
z | Integer | 0 | Blocks south. |
Examples
Is the block above this one air? This is the usual “is there room to grow” check:
{
"type": "apoli:offset",
"y": 1,
"condition": { "type": "apoli:air" }
} Standing on grass with air above, combined:
{
"type": "apoli:all_of",
"conditions": [
{ "type": "apoli:block", "block": "minecraft:grass_block" },
{
"type": "apoli:offset",
"y": 1,
"condition": { "type": "apoli:air" }
}
]
} Offsets nest, so you can reach diagonally or several blocks out:
{
"type": "apoli:offset",
"x": 1,
"condition": {
"type": "apoli:offset",
"y": -1,
"condition": { "type": "apoli:block", "block": "minecraft:water" }
}
}