跳转至

Send Event

文档版本:1.21.0.24

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
}
prioritypriority
priority:
integer
cast_durationnumber
Time in seconds for the entire event sending process.
look_at_targetboolean
If true, the mob will face the entity it sends an event to.
event_choicesarray
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_rangenumber
The minimum distance in blocks the target must be for this spell to be cast.
max_activation_rangenumber
The maxmimum distance in blocks the target must be for this spell to be cast.
cooldown_timenumber
Time in seconds before the mob can use this spell again.
cast_durationnumber
Time in seconds the spell casting will take.
filtersfilters
一个过滤器组
particle_colorstring
The color of the particles for this spell.
weightinteger
The weight of this spell. Controls how likely this spell will be picked
start_sound_eventsound_event
The sound event to play when using this spell.
sound_event:
string
sequencearray
List of events to send.
sequence
<any array element>object
<any array element>
base_delaynumber
Amount of time in seconds before starting this step.
eventstring
The event to send to the entity.
sound_eventsound_event
The sound event to play when this step happens.
sequencearray
List of events to send.
sequence