Panic¶
文档版本:1.21.50.25
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
}
}
priority
:priority
speed_multiplier
:speed_multiplier
damage_sources
:array- The list of Entity Damage Sources that will cause this mob to panic.
damage_sources
force
:boolean- If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it.
ignore_mob_damage
:boolean- If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in
damage_sources
prefer_water
:boolean- If true, the mob will prefer water over land.
panic_sound
:sound_event- The sound event to play when this mob is in panic.
sound_interval
:object- The range of time in seconds to randomly wait before playing the sound again.
sound_interval
range_min
:number- The minimum time in seconds before the
panic_sound
plays.
range_max
:number- The maximum time in seconds before the
panic_sound
plays.