Entity Documentation - minecraft:shooter (Entity)
minecraft:shooter
defines the entity's ranged attack behavior. The "minecraft:behavior.ranged_attack" goal uses this component to determine which projectiles to shoot.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
aux_val | -1 | Integer | ID of the Potion effect for the default projectile to be applied on hit |
def | not set | String | Actor definition to use as projectile for the ranged attack. The entity definition must have the projectile component to be able to be shot as a projectile |
magic | False | 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 | 0.00 | Decimal | Velocity in which the projectiles will be shot. A power of 0 will be overwritten by the default projectile throw power. |
projectiles | -- | List | 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. |
sound | -- | String | Sound that is played when the shooter shoots a projectile. |
Example
"minecraft:shooter":{
"aux_val": -1,
"def": "minecraft:small_fireball",
}
Vanilla entities examples
ghast
"minecraft:shooter": {
"def": "minecraft:fireball"
}
Vanilla entities using minecraft:shooter
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈