Area Of Effect (Entity Action Type)

Executes a Bi-Entity Action within a specified radius.

Executes a Bi-Entity Action within a specified radius.

Type ID: apoli:area_of_effect

In the context of this entity action type, the ’actor’ is the entity that invoked the action and the ’target(s)’ is/are the entity/entities within the specified radius.

Fields

FieldTypeDefaultDescription
radiusVector16.0The size of the area — a single number (uniform on all axes) or {"x":.., "y":.., "z":..} for independent per-axis extents.
shapeShape"cube"The outline of the area: cube, sphere, star, or cone.
bientity_actionBi-entity Action TypeThe bi-entity action to execute on either or both the ’actor’ or the ’target(s)‘.
bientity_conditionBi-entity Condition TypeoptionalIf specified, the specified bi-entity action will only be executed on either or both the ’actor’ or ’target(s)’ that fulfill this bi-entity condition.
include_actorBooleanfalseDetermines whether the ’actor’ should be included as a target.

Examples

"entity_action": {
    "type": "apoli:area_of_effect",
    "radius": 10,
    "shape": "sphere",
    "bientity_action": {
        "type": "apoli:target_action",
        "action": {
            "type": "apoli:spawn_entity",
            "entity_type": "minecraft:lightning_bolt"
        }
    }
}

This example will summon a lightning bolt on entities within a 10 block spherical radius.

"entity_action": {
    "type": "apoli:area_of_effect",
    "radius": 32,
    "bientity_action": {
        "type": "apoli:target_action",
        "action": {
            "type": "apoli:set_on_fire",
            "duration": 5
        }
    },
    "bientity_condition": {
        "type": "apoli:can_see"
    }
}

This example will set entities within a 32 block radius on fire for 5 seconds if the entities that are within the radius can be “seen” by the entity that invoked the action.

"entity_action": {
    "type": "apoli:area_of_effect",
    "shape": "cube",
    "radius": { "x": 12, "y": 3, "z": 12 },
    "bientity_action": {
        "type": "apoli:target_action",
        "action": { "type": "apoli:set_on_fire", "duration": 3 }
    }
}

This example gives radius a per-axis vector to make a wide, flat 25×7×25 slab (12 out on each horizontal axis, only 3 up/down) — a ground-hugging area effect instead of a full cube.