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

minecraft:behavior.work

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

Overview

minecraft:behavior.work is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes a villager walk to its job site block and work there for a while during the day.

Fields

FieldTypeDefaultDescription
sound_delay_mininteger0Shortest wait between work sounds.Range: 0 to …
sound_delay_maxinteger0Longest wait between work sounds.Range: 0 to …
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": {
    "sound_delay_min": 0,
    "sound_delay_max": 0,
    "goal_cooldown": 0,
    "active_time": 0,
    "can_work_in_rain": false,
    "work_in_rain_tolerance": -1,
    "on_arrival": {
      "event": "",
      "filters": {
        "AND": null,
        "NOT": null,
        "OR": null,
        "all": null,
        "all_of": null,
        "any": null,
        "any_of": null,
        "none_of": null
      },
      "target": "self"
    },
    "speed_multiplier": 0.5
  }
}

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