跳转至

Summon Entity

文档版本:1.21.0.24

Allows the mob to attack the player by summoning other entities.

架构

summon_entity:
{
  priority "priority"
  array "summon_choices" : opt
  {
    object "<any array element>" : opt
    {
      number "cast_duration" : opt
      number "cooldown_time" : opt
      boolean "do_casting" : opt
      filters "filters"
      number "max_activation_range" : opt
      number "min_activation_range" : opt
      integer "particle_color" : opt
      string "particle_color" : opt
      array "sequence" : opt
      {
        object "<any array element>" : opt
        {
          number "delay" : opt
          number "delay_per_summon" : opt
          number "entity_lifespan" : opt
          number "base_delay" : opt
          string "entity_type" : opt
          integer "num_entities_spawned" : opt
          string "shape" : opt
          number "size" : opt
          sound_event "sound_event"
          integer "summon_cap" : opt
          number "summon_cap_radius" : opt
          string "target" : opt
        }
      }
      sound_event "start_sound_event"
      number "weight" : opt
    }
  }
}
prioritypriority
priority:
integer
summon_choicesarray
List of spells for the mob to use to summon entities.
summon_choices
<any array element>object
<any array element>
cast_durationnumber
Time in seconds the spell casting will take.
cooldown_timenumber
Time in seconds the mob has to wait before using the spell again.
do_castingboolean
If true, the mob will do the casting animations and render spell particles.
filtersfilters
一个过滤器组
max_activation_rangenumber
Upper bound of the activation distance in blocks for this spell.
min_activation_rangenumber
Lower bound of the activation distance in blocks for this spell.
particle_colorinteger
The color of the particles for this spell.
particle_colorstring
The color of the particles for this spell.
sequencearray
List of steps for the spell.
sequence
<any array element>object
<any array element>
delaynumber
Amount of time in seconds to wait before this step starts.
delay_per_summonnumber
Amount of time in seconds before each entity is summoned in this step.
entity_lifespannumber
Amount of time in seconds that the spawned entity will be alive for. A value of -1.0 means it will remain alive for as long as it can
base_delaynumber
Amount of time in seconds to wait before this step starts.
entity_typestring
The entity type of the entities we will spawn in this step.
num_entities_spawnedinteger
Number of entities that will be spawned in this step.
shapestring
The base shape of this step. Valid values are circle and line
sizenumber
The base size of the entity.
sound_eventsound_event
The sound event to play for this step.
sound_event:
string
summon_capinteger
Maximum number of summoned entities at any given time.
summon_cap_radiusnumber
Maximum radius where the summon entities can spawn.
targetstring
The target of the spell. This is where the spell will start (line will start here, circle will be centered here)
start_sound_eventsound_event
The sound event to play when using this spell.
weightnumber
The weight of this spell. Controls how likely the mob is to choose this spell when casting one