跳转至

minecraft:angry

文档版本:1.21.0.24

Defines the entity's 'angry' state using a timer.

架构

minecraft:angry:
{
  string "angry_sound" : opt
  boolean "broadcast_anger" : opt
  boolean "broadcast_anger_on_attack" : opt
  boolean "broadcast_anger_on_being_attacked" : opt
  entity_filters "broadcast_filters"
  integer "broadcast_range" : opt
  array "broadcast_targets" : opt
  {
    string "<any array element>" : opt
  }
  object "calm_event" : opt
  {
    string "event" : opt
    string "target" : opt
  }
  integer "duration" : opt
  integer "duration_delta" : opt
  entity_filters "filters"
  array "sound_interval" : opt
  {
    integer "<any array element>" : opt
  }
}
angry_soundstring
The sound event to play when the mob is angry.
broadcast_angerboolean
If true, other entities of the same entity definition within the broadcastRange will also become angry.
broadcast_anger_on_attackboolean
If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks.
broadcast_anger_on_being_attackedboolean
If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked.
broadcast_filtersentity_filters
Conditions that make this entry in the list valid.
entity_filters:
{
  sub_filter "any_of"
  sub_filter "all_of"
  sub_filter "none_of"
}
any_ofsub_filter
sub_filter:
{
  string "test" : opt
  string "subject" : opt
  string "operator" : opt
  string "value" : opt
}
teststring
subjectstring
operatorstring
valuestring
sub_filter:
array
{
  object "<any array element>" : opt
  {
    string "test" : opt
    string "subject" : opt
    string "operator" : opt
    string "value" : opt
  }
}
<any array element>object
<any array element>
teststring
subjectstring
operatorstring
valuestring
all_ofsub_filter
none_ofsub_filter
broadcast_rangeinteger
Distance in blocks within which other entities of the same entity definition will become angry.
broadcast_targetsarray
A list of entity families to broadcast anger to.
broadcast_targets
<any array element>string
calm_eventobject
Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry').
calm_event
eventstring
targetstring
durationinteger
The amount of time in seconds that the entity will be angry.
duration_deltainteger
Variance in seconds added to the duration [-delta, delta].
filtersentity_filters
Filter out mob types that it should not attack while angry (other Piglins).
sound_intervalarray
The range of time in seconds to randomly wait before playing the sound again.
sound_interval
<any array element>integer