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_sound
:string- The sound event to play when the mob is angry.
broadcast_anger
:boolean- If true, other entities of the same entity definition within the broadcastRange will also become angry.
broadcast_anger_on_attack
:boolean- If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks.
broadcast_anger_on_being_attacked
:boolean- If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked.
broadcast_filters
:entity_filters- Conditions that make this entry in the list valid.
any_of
:sub_filter
sub_filter:
{
string "test" : opt
string "subject" : opt
string "operator" : opt
string "value" : opt
}
test
:string
subject
:string
operator
:string
value
:string
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>
test
:string
subject
:string
operator
:string
value
:string
all_of
:sub_filter
none_of
:sub_filter
broadcast_range
:integer- Distance in blocks within which other entities of the same entity definition will become angry.
broadcast_targets
:array- A list of entity families to broadcast anger to.
broadcast_targets
<any array element>
:string
calm_event
:object- Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry').
calm_event
event
:string
target
:string
duration
:integer- The amount of time in seconds that the entity will be angry.
duration_delta
:integer- Variance in seconds added to the duration [-delta, delta].
filters
:entity_filters- Filter out mob types that it should not attack while angry (other Piglins).
sound_interval
:array- The range of time in seconds to randomly wait before playing the sound again.
sound_interval
<any array element>
:integer