跳转至

Play Dead

文档版本:1.21.0.24

Allows the mob to play dead when attacked by other entities. When playing dead, other entities will not target this mob.

架构

play_dead:
{
  priority "priority"
  boolean "apply_regeneration" : opt
  number "duration" : opt
  filters "filters"
  integer "force_below_health" : opt
  number "random_start_chance" : opt
  array "random_damage_range" : opt
  {
    integer "0..0" : opt
    integer "1..1" : opt
  }
  entity_damage_source "damage_sources"
  array "damage_sources" : opt
  {
    entity_damage_source "<any array element>"
  }
}
prioritypriority
priority:
integer
apply_regenerationboolean
Whether the mob will receive the regeneration effect while playing dead.
durationnumber
The amount of time the mob will remain playing dead (in seconds).
filtersfilters
一个过滤器组。The list of other triggers that are required for the mob to activate play dead.
force_below_healthinteger
The amount of health at which damage will cause the mob to play dead.
random_start_chancenumber
The likelihood of this goal starting upon taking damage.
random_damage_rangearray
The range of damage that may cause the goal to start depending on randomness. Damage taken below the min will never cause the goal to start. Damage taken above the max will always cause the goal to start.
random_damage_range
0..0integer
Minimum.
1..1integer
Maximum.
damage_sourcesentity_damage_source
The list of Entity Damage Sources that will cause this mob to play dead.
entity_damage_source:
string
damage_sourcesarray
The list of Entity Damage Sources that will cause this mob to play dead.
damage_sources
<any array element>entity_damage_source