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

minecraft:behavior.leap_at_target

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

概览

minecraft:behavior.leap_at_target 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让生物扑向目标的 AI 目标,就像蜘蛛猛扑。适用于敌对生物。

字段

字段类型默认值说明
ydnumber0飞扑的高度(格)。
must_be_on_groundbooleantrue为 true 时,生物只能从地面起扑。设为 false 可允许在空中飞扑。
set_persistentbooleanfalse为 true 时,生物锁定玩家后不会消失。
priorityinteger0数字越小越先执行:两个目标冲突时,priority 更小的那个胜出。范围:0 到 …
control_flagsGoal's control flags[]无此目标接管哪些身体部分(移动、看向、跳跃),占用相同部分的目标不能同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.leap_at_target": {
    "yd": 0,
    "must_be_on_ground": true,
    "set_persistent": false,
    "priority": 0,
    "control_flags": []
  }
}

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