Skip to main content

In Block Anywhere (Entity Condition Type)

Counts how many blocks that pass a block condition overlap the entity's eyes or feet, and compares the count with a number.

Type ID: apoli:in_block_anywhere

Fields

FieldTypeDefaultDescription
block_conditionBlock Condition TyperequiredThe condition a block must pass to be counted.
comparisonComparison">="How the count is compared with compare_to.
compare_toInteger1The number the count is compared with.

Examples

"condition": {
    "type": "apoli:in_block_anywhere",
    "block_condition": {
        "type": "apoli:in_tag",
        "tag": "minecraft:flowers"
    },
    "comparison": ">",
    "compare_to": 1
}

This checks whether the entity is inside a two-block tall plant from the #minecraft:flowers block tag (data/minecraft/tags/blocks/flowers.json), such as a rose bush.