跳转至

Panic

文档版本:1.21.0.24

Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.

架构

panic:
{
  priority "priority"
  speed_multiplier "speed_multiplier"
  array "damage_sources" : opt
  {
    entity_damage_source "<any array element>"
  }
  boolean "force" : opt
  boolean "ignore_mob_damage" : opt
  boolean "prefer_water" : opt
  sound_event "panic_sound"
  object "sound_interval" : opt
  {
    number "range_min" : opt
    number "range_max" : opt
  }
}
prioritypriority
priority:
integer
speed_multiplierspeed_multiplier
speed_multiplier:
number
damage_sourcesarray
The list of Entity Damage Sources that will cause this mob to panic.
damage_sources
<any array element>entity_damage_source
entity_damage_source:
string
forceboolean
If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it.
ignore_mob_damageboolean
If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in damage_sources
prefer_waterboolean
If true, the mob will prefer water over land.
panic_soundsound_event
The sound event to play when this mob is in panic.
sound_event:
string
sound_intervalobject
The range of time in seconds to randomly wait before playing the sound again.
sound_interval
range_minnumber
The minimum time in seconds before the panic_sound plays.
range_maxnumber
The maximum time in seconds before the panic_sound plays.