Send Event¶
文档版本:1.21.50.25
Allows the mob to send an event to another mob.
架构¶
send_event:
{
priority "priority"
number "cast_duration" : opt
boolean "look_at_target" : opt
array "event_choices" : opt
{
object "<any array element>" : opt
{
number "min_activation_range" : opt
number "max_activation_range" : opt
number "cooldown_time" : opt
number "cast_duration" : opt
filters "filters"
string "particle_color" : opt
integer "weight" : opt
sound_event "start_sound_event"
array "sequence" : opt
{
object "<any array element>" : opt
{
number "base_delay" : opt
string "event" : opt
sound_event "sound_event"
}
}
}
}
array "sequence" : opt
}
priority:priority
cast_duration:number- Time in seconds for the entire event sending process.
look_at_target:boolean- If true, the mob will face the entity it sends an event to.
event_choices:array- List of spells for the mob to use.
event_choices<any array element>:object- A spell that the mob can cast.
<any array element>min_activation_range:number- The minimum distance in blocks the target must be for this spell to be cast.
max_activation_range:number- The maxmimum distance in blocks the target must be for this spell to be cast.
cooldown_time:number- Time in seconds before the mob can use this spell again.
cast_duration:number- Time in seconds the spell casting will take.
filters:filters- 一个过滤器组。
particle_color:string- The color of the particles for this spell.
weight:integer- The weight of this spell. Controls how likely this spell will be picked
start_sound_event:sound_event- The sound event to play when using this spell.
sequence:array- List of events to send.
sequence<any array element>:object
<any array element>base_delay:number- Amount of time in seconds before starting this step.
event:string- The event to send to the entity.
sound_event:sound_event- The sound event to play when this step happens.
sequence:array- List of events to send.
sequence