跳转至

Area Attack

文档版本:1.21.0.24

A component that does damage to entities that get within range.

架构

area_attack:
{
  entity_damage_source "cause"
  number "damage_cooldown" : opt
  integer "damage_per_tick" : opt
  number "damage_range" : opt
  filters "entity_filter"
  boolean "play_attack_sound" : opt
}
causeentity_damage_source
The type of damage that is applied to entities that enter the damage range.
entity_damage_source:
string
damage_cooldownnumber
Attack cooldown (in seconds) for how often this entity can attack a target.
damage_per_tickinteger
How much damage per tick is applied to entities that enter the damage range.
damage_rangenumber
How close a hostile entity must be to have the damage applied.
entity_filterfilters
一个过滤器组。The set of entities that are valid to apply the damage to when within range.
play_attack_soundboolean
If the entity should play their attack sound when attacking a target.