Area of Effect

Entity Action Type

Executes a Bi-Entity Action within a specified radius.

Type ID: origins:area_of_effect

Note

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

Field Type Default Description
radius Float 16.0 Determines the radius of the area.
shape Shape "cube" Determines the shape of the area.
bientity_action Bi-entity Action Type The bi-entity action to execute on either or both the 'actor' or the 'target(s)'.
bientity_condition Bi-entity Condition Type optional If 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_actor Boolean false Determines whether the 'actor' should be included as a target.

Examples

"entity_action": {
    "type": "origins:area_of_effect",
    "radius": 10,
    "shape": "sphere",
    "bientity_action": {
        "type": "origins:target_action",
        "action": {
            "type": "origins: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": "origins:area_of_effect",
    "radius": 32,
    "bientity_action": {
        "type": "origins:target_action",
        "action": {
            "type": "origins:set_on_fire",
            "duration": 5
        }
    },
    "bientity_condition": {
        "type": "origins: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.