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

minecraft:behavior.follow_caravan

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

概览

minecraft:behavior.follow_caravan 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让生物加入生物队列并跟随前面那只的 AI 目标,比如拴着拴绳的羊驼。

字段

字段类型默认值说明
speed_multipliernumber1跟随商队时的速度倍率。
entity_countinteger1一支商队最多可以有多少只生物。
entity_typesEntityTypes无此生物可以在商队中跟随哪些实体。
priorityinteger0数字越小越先执行:两个目标冲突时,priority 更小的那个胜出。范围:0 到 …
control_flagsGoal's control flags[]无此目标接管哪些身体部分(移动、看向、跳跃),占用相同部分的目标不能同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.follow_caravan": {
    "speed_multiplier": 1,
    "entity_count": 1,
    "entity_types": {},
    "priority": 0,
    "control_flags": []
  }
}

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