minecraft:behavior.work_composter for you with a switch.Get GodCraftOverview
minecraft:behavior.work_composter is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes a farmer villager use a composter: it adds spare seeds and other compostable items and collects the bone meal.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
use_block_min | integer | 100 | Shortest wait between uses of the composter.Range: 0 to … |
use_block_max | integer | 200 | Longest wait between uses of the composter.Range: 0 to … |
items_per_use_max | integer | 20 | Most items added to the composter in one use.Range: 0 to … |
block_interaction_max | integer | 1 | Most times the mob uses the composter in one go.Range: 0 to … |
can_fill_composter | boolean | true | If true, the mob can put items into a composter that isn't full. |
can_empty_composter | boolean | true | If true, the mob can empty a full composter. |
min_item_count | integer | 10 | How many of each compostable item the mob keeps. Anything above this can be composted. |
goal_cooldown | integer | 0 | Ticks before the goal can be used again.Range: 0 to … |
active_time | integer | 0 | Ticks the mob stays at its work spot.Range: 0 to … |
can_work_in_rain | boolean | false | If true, the mob keeps working when rain falls on its job site. |
work_in_rain_tolerance | integer | -1 | When can_work_in_rain is false: if the goal has fewer than this many ticks left, rain won't stop it.Range: 0 to … |
on_arrival | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that runs when the mob reaches its job site. |
speed_multiplier | number | 0.5 | Speeds the mob up or slows it down while this goal runs: 1 is normal speed. |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
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
}
}