minecraft:behavior.take_flower

Allows the mob to accept flowers from another mob with the minecraft:offer_flower behavior.

Properties

PropertyTypeDefaultWhat it does
speed_multiplierDecimalmin 00.5Movement speed multiplier of the mob when using this AI Goal.
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Conditions that need to be met for the behavior to start.
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.
min_wait_timeDecimalmin 04The minimum amount of time (in seconds) for the mob to randomly wait for before taking the flower.
max_wait_timeDecimalmin 020The maximum amount of time (in seconds) for the mob to randomly wait for before taking the flower.
search_areaList of decimal or Object[6, 2, 6]The dimensions of the AABB used to search for a potential mob to take a flower from.
xDecimal0
yDecimal0
zDecimal0
max_rotation_xDecimal30Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target.
max_head_rotation_yDecimal30Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target.
min_distance_to_targetDecimal2Minimum distance (in blocks) for the entity to be considered having reached its target.
on_take_flowerObject{"event": "", "filters": {"AND": null, "NOT": null, "OR":…Event triggered when the entity takes a flower from another entity.
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.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Copper Golem uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.take_flower": {
    "filters": {
      "all_of": [
        {
          "test": "is_daytime",
          "value": true
        },
        {
          "domain": "minecraft:has_flower",
          "test": "bool_property",
          "value": false
        }
      ]
    },
    "on_take_flower": {
      "event": "minecraft:on_take_flower"
    },
    "priority": 4
  }
}

Used by 3

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

Related components