概览
minecraft:behavior.mount_pathing 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让载着骑手的生物自行朝要攻击的目标移动的 AI 目标,比如蜘蛛骑士中的蜘蛛。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
speed_multiplier | number | 1 | 移动时的速度倍率。 |
target_dist | number | 0 | 生物希望与目标保持的距离。 |
track_target | boolean | false | 为 true 时,只要目标仍然有效,生物会持续追击。 |
priority | integer | 0 | 数字越小越先执行:两个目标冲突时,priority 更小的那个胜出。范围:0 到 … |
control_flags | Goal's control flags[] | 无 | 此目标接管哪些身体部分(移动、看向、跳跃),占用相同部分的目标不能同时运行。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:behavior.mount_pathing": {
"speed_multiplier": 1,
"target_dist": 0,
"track_target": false,
"priority": 0,
"control_flags": []
}
}