minecraft:behavior.work_composter

Allows the NPC to use the composter POI to convert excess seeds into bone meal.

Properties

PropertyTypeDefaultWhat it does
use_block_minIntegermin 0100The minimum interval in which the mob will interact with the composter.
use_block_maxIntegermin 0200The maximum interval in which the mob will interact with the composter.
items_per_use_maxIntegermin 020The maximum number of items which can be added to the composter per block interaction.
block_interaction_maxIntegermin 01The maximum number of times the mob will interact with the composter.
can_fill_composterBooleantrueDetermines whether the mob can add items to a composter given that it is not full.
can_empty_composterBooleantrueDetermines whether the mob can empty a full composter.
min_item_countInteger10Limits the amount of each compostable item the mob can use. Any amount held over this number will be composted if possible
goal_cooldownIntegermin 00The amount of ticks the goal will be on cooldown before it can be used again
active_timeIntegermin 00The amount of ticks the NPC will stay in their the work location
can_work_in_rainBooleanfalseIf true, this entity can work when their jobsite POI is being rained on.
work_in_rain_toleranceIntegermin 0-1If "can_work_in_rain" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal
on_arrivalObject{"event": "", "filters": {"AND": null, "NOT": null, "OR":…Event to run when the mob reaches their jobsite.
eventText""
targetTextself, other, player, target, parent, baby, block, damager, holder, item"self"
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
speed_multiplierDecimal0.5Movement speed multiplier of the mob when using this AI Goal
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Villager uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.work_composter": {
    "active_time": 250,
    "priority": 9,
    "can_work_in_rain": false,
    "on_arrival": {
      "event": "minecraft:resupply_trades",
      "target": "self"
    },
    "goal_cooldown": 200,
    "speed_multiplier": 0.5,
    "work_in_rain_tolerance": 100
  }
}

Used by 1

Vanilla entities with minecraft:behavior.work_composter in their definition:

Related components