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

minecraft:behavior.fertilize_farm_block

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

Overview

minecraft:behavior.fertilize_farm_block is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob use bone meal from its inventory on nearby crops, like farmer villagers. It does nothing without fertilizer.

Fields

FieldTypeDefaultDescription
max_fertilizer_usageinteger1Most times the mob uses fertilizer on one crop.
search_cooldown_max_secondsnumber8Longest random wait in seconds before searching again.
search_rangeinteger1How far sideways, in blocks, the mob looks for crops.
search_heightinteger1How far up and down, in blocks, the mob looks for crops.
goal_radiusnumber1.5How close the mob must get to the crop to count as arrived.
search_countinteger9How many random blocks are checked each tick. 0 checks every block in range.Range: 0 to …
speed_multipliernumber0.5Speed multiplier while moving to the crop.Range: 0 to …
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:behavior.fertilize_farm_block": {
    "max_fertilizer_usage": 1,
    "search_cooldown_max_seconds": 8,
    "search_range": 1,
    "search_height": 1,
    "goal_radius": 1.5,
    "search_count": 9,
    "speed_multiplier": 0.5,
    "priority": 0
  }
}

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