1. Wiki
  2. /实体
  3. /minecraft:behavior.swoop_attack

minecraft:behavior.swoop_attack

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:behavior.swoop_attack。Get GodCraft

概览

minecraft:behavior.swoop_attack 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 飞行生物向目标俯冲的攻击,就像幻翼。生物撞到墙或被击中时俯冲会结束。

字段

字段类型默认值说明
damage_reachnumber0.2与生物体型相加,决定它要离多近才能造成伤害。
speed_multipliernumber1向目标俯冲时的速度倍率。
delay_rangeFloatRange{"max":20,"min":10}两次俯冲之间的随机等待时间(秒)。
priorityinteger0多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 …
control_flagsGoal's control flags[]无列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:behavior.swoop_attack": {
    "damage_reach": 0.2,
    "speed_multiplier": 1,
    "delay_range": {
      "max": 20,
      "min": 10
    },
    "priority": 0,
    "control_flags": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more