minecraft:behavior.take_flower
Allows the mob to accept flowers from another mob with the minecraft:offer_flower behavior.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed_multiplier | Decimalmin 0 | 0.5 | Movement speed multiplier of the mob when using this AI Goal. |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Conditions that need to be met for the behavior to start. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
min_wait_time | Decimalmin 0 | 4 | The minimum amount of time (in seconds) for the mob to randomly wait for before taking the flower. |
max_wait_time | Decimalmin 0 | 20 | The maximum amount of time (in seconds) for the mob to randomly wait for before taking the flower. |
search_area | List of decimal or Object | [6, 2, 6] | The dimensions of the AABB used to search for a potential mob to take a flower from. |
x | Decimal | 0 | |
y | Decimal | 0 | |
z | Decimal | 0 | |
max_rotation_x | Decimal | 30 | Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. |
max_head_rotation_y | Decimal | 30 | Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. |
min_distance_to_target | Decimal | 2 | Minimum distance (in blocks) for the entity to be considered having reached its target. |
on_take_flower | Object | {"event": "", "filters": {"AND": null, "NOT": null, "OR":… | Event triggered when the entity takes a flower from another entity. |
event | Text | "" | |
target | Textself, other, player, target, parent, baby, block, damager, holder, item | "self" | |
filters | Object 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. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
priority | Integermin 0 | 0 | |
control_flags | List 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
behavior.look_at_playerbehavior.temptbehavior.breedbehavior.mount_pathingbehavior.follow_parentbehavior.player_ride_tamedbehavior.find_mountbehavior.celebratebehavior.follow_ownerbehavior.stay_while_sittingbehavior.look_at_trading_playerbehavior.random_look_around_and_sitbehavior.trade_with_playerbehavior.celebrate_survivebehavior.controlled_by_playerbehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interestbehavior.admire_item