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

minecraft:behavior.slime_attack

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

概览

minecraft:behavior.slime_attack 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 史莱姆和岩浆怪使用的跳跃攻击。生物时不时会累了,暂时停止攻击。

字段

字段类型默认值说明
x_max_rotationnumber10生物面向目标时最多能上下仰俯的角度(度)。
y_max_rotationnumber10生物面向目标时最多能左右转动的角度(度)。
speed_multipliernumber1朝目标移动时的速度倍率。
grow_tired_cooldown_timenumber15生物累了之后休息多长时间(秒)才再次攻击。
set_persistentbooleanfalse设为 true 时,生物锁定玩家后就不会消失。
priorityinteger0多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 …
control_flagsGoal's control flags[]无列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.slime_attack": {
    "x_max_rotation": 10,
    "y_max_rotation": 10,
    "speed_multiplier": 1,
    "grow_tired_cooldown_time": 15,
    "set_persistent": false,
    "priority": 0,
    "control_flags": []
  }
}

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