概览
minecraft:behavior.teleport_to_owner 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 被驯服的生物落后太远时,让它传送到主人身边。狼和猫用它跟上主人。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
filters | Filter Group | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | 生物传送必须满足的条件。 |
cooldown | number | 1 | 生物再次尝试传送前的秒数。范围:0 到 … |
priority | integer | 0 | 多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 … |
control_flags | Goal's control flags[] | 无 | 列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:behavior.teleport_to_owner": {
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"cooldown": 1,
"priority": 0,
"control_flags": []
}
}