Skip to content

Blocks Intersecting Box

Provides the count of blocks which fulfills a condition intersecting with a box.

Type ID: kaya:blocks_intersecting_box

Info

This type provides the following context parameters when checking the blocks intersecting with the box:

Parameter Description
kaya:block_intersecting_block The block intersecting with the box.

Format

Field Type Default Description
condition Condition The condition to check on the blocks colliding with the box.
box Box Provider The box to use to check for blocks.

Example

{
    "type": "kaya:blocks_intersecting_box",
    "condition": {
        "type": "kaya:check_block_type",
        "key": "minecraft:grass_block",
        "block": "block_intersecting_box"
    },
    "box": {
        "type": "kaya:inflate",
        "box": {
            "type": "kaya:entity/bounds",
            "entity": "this"
        },
        "vector": [
            1.0,
            1.0,
            1.0
        ]
    }
}

This example provides the count of grass blocks intersecting with the bounding box (inflated by 1 block) of the entity provided by the kaya:this_entity context parameter.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.