跳转至

Attack Cooldown

文档版本:1.21.0.24

Adds a cooldown to a mob. The intention of this cooldown is to be used to prevent the mob from attempting to aquire new attack targets.

架构

attack_cooldown:
{
  trigger "attack_cooldown_complete_event"
  array "attack_cooldown_time" : opt
  {
    number "0..0" : opt
    number "1..1" : opt
  }
  number "attack_cooldown_time" : opt
}
attack_cooldown_complete_eventtrigger
Event to be run when the cooldown is complete.
trigger:
string
trigger:
{
  string "event" : opt
  filters "filters"
  subject "target"
}
eventstring
The event to run when the conditions for this trigger are met.
filtersfilters
一个过滤器组。The list of conditions for this trigger to execute.
targetsubject
The target of the event.
subject:
string
trigger:
array
{
  object "<any array element>" : opt
  {
    string "event" : opt
    filters "filters"
    subject "target"
  }
}
<any array element>object
<any array element>
attack_cooldown_timearray
Amount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (Minimum and max).
attack_cooldown_time
0..0number
1..1number
attack_cooldown_timenumber
Amount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (Minimum and max).