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

minecraft:behavior.offer_flower

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

概览

minecraft:behavior.offer_flower 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让生物向附近拥有 take_flower 目标的生物递出一朵花,就像铁傀儡给村民小孩送虞美人。

字段

字段类型默认值说明
max_offer_flower_durationnumber20生物递花的最长时间(秒)。范围:0 到 …
chance_to_startnumber0.000125目标开始的几率,从 0 到 1。1 表示每次都会开始。范围:0 到 1
filtersFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}目标开始运行必须满足的条件。
search_areavec3[6,2,6]以生物为中心、用来寻找送花对象的范围盒大小。
max_rotation_xnumber30生物看向另一个生物时最多能上下仰俯的角度(度)。范围:0 到 …
max_head_rotation_ynumber30生物看向另一个生物时头部最多能左右转动的角度(度)。范围:0 到 …
priorityinteger0多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 …
control_flagsGoal's control flags[]无列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.offer_flower": {
    "max_offer_flower_duration": 20,
    "chance_to_start": 0.000125,
    "filters": {
      "AND": null,
      "NOT": null,
      "OR": null,
      "all": null,
      "all_of": null,
      "any": null,
      "any_of": null,
      "none_of": null
    },
    "search_area": [
      6,
      2,
      6
    ],
    "max_rotation_x": 30,
    "max_head_rotation_y": 30,
    "priority": 0,
    "control_flags": []
  }
}

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