Skip to content

Area of Effect

Executes an action on targets within the radius of an area.

Type ID: kaya:area_of_effect

Info

This type will provide the following context parameters to the action and condition fields when checking for targets and executing if fulfilled depending on the area's specified target:

Parameter Description
kaya:entity_in_area The affected entity in the specified area.
Parameter Description
kaya:block_in_area The affected block in the specified area.

Format

Field Type Default Description
area Area The area to get the targets from.
action Action The action to execute to the targets.
condition Condition optional If specified, only targets that fulfill this condition will have the action executed on them.
limit Int Provider optional If specified, the iteration will be ended early if this amount of targets have been processed, unless it's 0 or a negative value.

Example

{
    "type": "kaya:area_of_effect",
    "area": {
        "type": "kaya:radius",
        "target": "entity",
        "shape": "cube",
        "position": {
            "type": "kaya:entity/position",
            "entity": "this"
        },
        "radius": 16.0
    },
    "action": {
        "type": "kaya:set_entity_on_fire",
        "ticks": 200,
        "entity": "entity_in_area"
    },
    "condition": {
        "type": "kaya:check_entity_type",
        "key": "minecraft:creeper",
        "entity": "entity_in_area"
    }
}

This example will set creeprs on fire within a 16.0 blocks cubical area relative to the position of the entity provided by the kaya:this_entity context parameter.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.