minecraft:behavior.send_event
Allows the mob to send an event to another mob.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
event_choices | List of object | [] | List of spell options to select from. One is randomly chosen each time the goal activates. |
min_activation_range | Decimal | 1 | Minimum distance in blocks the target must be for this spell to activate |
max_activation_range | Decimal | 32 | Maximum distance in blocks the target can be for this spell to activate |
cooldown_time | Decimal | 0 | Time in seconds the mob has to wait before using this spell again |
weight | Decimal | 0 | Relative weight of this spell choice when randomly selected from valid choices |
look_at_target | Boolean | true | If true, the mob will face the entity it sends an event to |
do_casting | Boolean | true | If true, the mob will show a casting animation while sending the event |
start_sound_event | Text | "" | The sound event to play when this spell starts |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Conditions that the target must meet to be eligible for receiving the event |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
cast_duration | Decimal | 0 | Time in seconds for the entire event sending process |
sequence | List of object | [] | List of events to send |
base_delay | Decimal | 0 | Amount of time in seconds before starting this step |
event | Text | "" | The event to send to the entity |
sound_event | Text | "" | The sound event to play when this step happens |
particle_color | Text or List of integer | [255, 255, 255, 255] | The color of the particles spawned while casting this spell |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Evoker uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.send_event": {
"event_choices": [
{
"particle_color": "#FFB38033",
"cast_duration": 3,
"max_activation_range": 16,
"filters": {
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "sheep"
},
{
"subject": "other",
"test": "is_color",
"value": "blue"
}
]
},
"cooldown_time": 5,
"min_activation_range": 0,
"start_sound_event": "cast.spell",
"sequence": [
{
"base_delay": 2,
"event": "wololo",
"sound_event": "prepare.wololo"
}
],
"weight": 3
}
],
"priority": 3
}
}Used by 1
Vanilla entities with minecraft:behavior.send_event in their definition:
Related components
behavior.nearest_attackable_targetbehavior.melee_box_attackbehavior.ranged_attackbehavior.stomp_turtle_eggbehavior.leap_at_targetbehavior.nearest_prioritized_attackable_targetbehavior.aquatic_charge_attackbehavior.charge_held_itembehavior.guardian_attackbehavior.ocelotattackbehavior.slime_attackbehavior.charge_attackbehavior.delayed_attackbehavior.dragonchargeplayerbehavior.dragonflamingbehavior.dragonstrafeplayerbehavior.fire_at_targetbehavior.knockback_roarbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.sonic_boombehavior.stomp_attackbehavior.summon_entity