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.

Type ID: origins:block_in_radius

Fields

Field Type Default Description
block_condition Block Condition Type The block condition type to check for.
radius Integer The radius to check the blocks that fulfills the specified block condition type within.
shape String "cube" Determines the shape of the radius. Accepts "cube", "star" or "sphere".
comparison Comparison ">=" How the amount of blocks within the specified radius which fulfills the specified block condition type should be compared to the specified value.
compare_to Integer 1 The value to compare the amount to.

Examples

"condition": {
    "type": "origins:block_in_radius",
    "block_condition": {
        "type": "origins: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.