Block In Radius (Entity Condition Type)

Checks whether there is a specified number of blocks that fulfills the specified Block Condition Type within a specified radius relative to the entity's feet.

Checks whether there is a specified number of blocks that fulfills the specified Block Condition Type within a specified radius relative to the entity’s feet.

Type ID: apoli:block_in_radius

Fields

FieldTypeDefaultDescription
block_conditionBlock Condition TypeThe block condition type to check for.
radiusIntegerThe radius of the area to check how many blocks fulfill the block_condition.
shapeString"cube"Determines the shape of the radius. Accepts "cube", "star" or "sphere".
comparisonComparison">="Determines how the amount of blocks which fulfill block_condition block condition should be compared to the specified value.
compare_toInteger1The value at which the amount of blocks which fulfill block_condition will be compared to.

Examples

"condition": {
    "type": "apoli:block_in_radius",
    "block_condition": {
        "type": "apoli:in_tag",
        "tag": "origins:natural_stone"
    },
    "radius": 1,
    "shape": "cube",
    "comparison": ">=",
    "compare_to": 4
}

This example will check if 4 or more blocks that is included in the origins:natural_stone (data/origins/tags/blocks/natural_stone.json) block tag is within a 1 block radius relative from the entity.