1. Wiki
  2. /Entities
  3. /minecraft:behavior.work_composter

minecraft:behavior.work_composter

Don't want to write this by hand? GodCraft sets minecraft:behavior.work_composter for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
use_block_mininteger100Shortest wait between uses of the composter.Range: 0 to …
use_block_maxinteger200Longest wait between uses of the composter.Range: 0 to …
items_per_use_maxinteger20Most items added to the composter in one use.Range: 0 to …
block_interaction_maxinteger1Most times the mob uses the composter in one go.Range: 0 to …
can_fill_composterbooleantrueIf true, the mob can put items into a composter that isn't full.
can_empty_composterbooleantrueIf true, the mob can empty a full composter.
min_item_countinteger10How many of each compostable item the mob keeps. Anything above this can be composted.
goal_cooldowninteger0Ticks before the goal can be used again.Range: 0 to …
active_timeinteger0Ticks the mob stays at its work spot.Range: 0 to …
can_work_in_rainbooleanfalseIf true, the mob keeps working when rain falls on its job site.
work_in_rain_toleranceinteger-1When 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_arrivalActorDefinitionTrigger{"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_multipliernumber0.5Speeds the mob up or slows it down while this goal runs: 1 is normal speed.
priorityinteger0Decides which goal wins when several want to run: lower numbers run first.Range: 0 to …
control_flagsGoal's control flags[]noneLists 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
  }
}

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