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

minecraft:behavior.work_composter

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

概览

minecraft:behavior.work_composter 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让农民村民使用堆肥桶:放入多余的种子和其他可堆肥物品,并收集骨粉。

字段

字段类型默认值说明
use_block_mininteger100两次使用堆肥桶之间的最短等待时间。范围:0 到 …
use_block_maxinteger200两次使用堆肥桶之间的最长等待时间。范围:0 到 …
items_per_use_maxinteger20一次最多往堆肥桶里放多少物品。范围:0 到 …
block_interaction_maxinteger1生物一轮中最多使用堆肥桶的次数。范围:0 到 …
can_fill_composterbooleantrue设为 true 时,生物可以往没满的堆肥桶里放物品。
can_empty_composterbooleantrue设为 true 时,生物可以清空装满的堆肥桶。
min_item_countinteger10每种可堆肥物品生物保留多少个。超出的部分可以拿去堆肥。
goal_cooldowninteger0目标可以再次使用前的刻数。范围:0 到 …
active_timeinteger0生物在工作地点停留的刻数。范围:0 到 …
can_work_in_rainbooleanfalse设为 true 时,即使工作站点下雨,生物也会继续工作。
work_in_rain_toleranceinteger-1当 can_work_in_rain 为 false 时:如果目标剩余的刻数少于这个值,下雨也不会让它停下。范围:0 到 …
on_arrivalActorDefinitionTrigger{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}生物到达工作站点时触发的事件。
speed_multipliernumber0.5这个目标运行时让生物加速或减速:1 为正常速度。
priorityinteger0多个目标同时想运行时决定谁优先:数字越小越先运行。范围:0 到 …
control_flagsGoal's control flags[]无列出这个目标要控制的身体部分(比如移动、看向或跳跃),这样需要同一部分的目标就不会同时运行。

示例

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

BP/entities/<name>.json
{
  "minecraft:behavior.work_composter": {
    "use_block_min": 100,
    "use_block_max": 200,
    "items_per_use_max": 20,
    "block_interaction_max": 1,
    "can_fill_composter": true,
    "can_empty_composter": true,
    "min_item_count": 10,
    "goal_cooldown": 0
  }
}

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