Skip to main content

Adjacent (Block Condition Type)

Counts how many of the six blocks next to this one pass a block condition, and compares the count with a number.

Type ID: apoli:adjacent

Fields

FieldTypeDefaultDescription
adjacent_conditionBlock Condition TyperequiredThe condition a neighbouring block must pass to be counted.
comparisonComparisonrequiredHow the count is compared with compare_to.
compare_toIntegerrequiredThe number of matching neighbours to compare against. A block has six neighbours, so this is 0 to 6.

Examples

"block_condition": {
    "type": "apoli:adjacent",
    "adjacent_condition": {
        "type": "apoli:block",
        "block": "minecraft:iron_ore"
    },
    "comparison": ">=",
    "compare_to": 4
}

This checks whether four or more iron ore blocks are next to the block.