Shooter¶
文档版本:1.21.50.25
Defines the entity's ranged attack behavior.
架构¶
shooter:
{
integer "aux_val" : opt
string "def" : opt
boolean "magic" : opt
number "power" : opt
array "projectiles" : opt
{
string "<any array element>" : opt
object "<any array element>" : opt
{
integer "aux_val" : opt
string "def" : opt
filters "filters"
}
}
string "sound" : opt
}
aux_val
:integer- ID of the Potion effect to be applied on hit.
def
:string- Actor definition to use as projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile
magic
:boolean- Sets whether the projectiles being used are flagged as magic. If set, the ranged attack goal will not be used at the same time as other magic goals, such as minecraft:behavior.drink_potion.
power
:number- Velocity in which the projectiles will be shot. A power of 0 will be overwritten by the default projectile throw power.
projectiles
:array- List of projectiles that can be used by the shooter. Projectiles are evaluated in the order of the list; after a projectile is chosen, the rest of the list is ignored.
projectiles
<any array element>
:string- Projectiles that can be used by the shooter
<any array element>
:object- A projectile defintion
<any array element>
aux_val
:integer- ID of the Potion effect to be applied on hit.
def
:string- Actor definition to use as projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile
filters
:filters- 一个过滤器组。
sound
:string- Sound that is played when the shooter shoots a projectile.