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

minecraft:behavior.offer_flower

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

Overview

minecraft:behavior.offer_flower is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the mob hold out a flower to a nearby mob that has the take_flower goal, like an iron golem offering a poppy to a villager child.

Fields

FieldTypeDefaultDescription
max_offer_flower_durationnumber20Longest time, in seconds, the mob holds out the flower.Range: 0 to …
chance_to_startnumber0.000125Chance from 0 to 1 that the goal starts. 1 means every time.Range: 0 to 1
filtersFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Conditions that must be true for the goal to start.
search_areavec3[6,2,6]Size of the box around the mob used to find someone to offer the flower to.
max_rotation_xnumber30How far, in degrees, the mob can tilt up or down while looking at the other mob.Range: 0 to …
max_head_rotation_ynumber30How far, in degrees, the mob can turn its head sideways while looking at the other mob.Range: 0 to …
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.offer_flower": {
    "max_offer_flower_duration": 20,
    "chance_to_start": 0.000125,
    "filters": {
      "AND": null,
      "NOT": null,
      "OR": null,
      "all": null,
      "all_of": null,
      "any": null,
      "any_of": null,
      "none_of": null
    },
    "search_area": [
      6,
      2,
      6
    ],
    "max_rotation_x": 30,
    "max_head_rotation_y": 30,
    "priority": 0,
    "control_flags": []
  }
}

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