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

minecraft:behavior.random_fly

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

概览

minecraft:behavior.random_fly 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让飞行生物飞往随机地点,就像鹦鹉。

字段

字段类型默认值说明
can_land_on_treesbooleantrue设为 true 时,生物除了地面还可以落在树上。
speed_multipliernumber1这个目标运行时让生物加速或减速:1 为正常速度。
xz_distinteger10生物在水平方向上寻找新位置的范围。至少为 1。
y_distinteger7生物在上下方向上寻找新位置的范围。至少为 1。
priorityinteger0多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 …
control_flagsGoal's control flags[]无列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.random_fly": {
    "can_land_on_trees": true,
    "speed_multiplier": 1,
    "xz_dist": 10,
    "y_dist": 7,
    "priority": 0,
    "control_flags": []
  }
}

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