minecraft:behavior.offer_flower
Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
max_offer_flower_duration | Decimalmin 0 | 20 | The max amount of time (in seconds) that the mob will offer the flower for before exiting the Goal. |
chance_to_start | Decimal0 to 1 | 0.0001 | Percent chance that the mob will start this goal from 0.0 to 1.0 (where 1.0 = 100%). |
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. |
search_area | List of decimal or Object | [6, 2, 6] | The dimensions of the AABB used to search for a potential mob to offer flower to. |
x | Decimal | 0 | |
y | Decimal | 0 | |
z | Decimal | 0 | |
max_rotation_x | Decimalmin 0 | 30 | Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. |
max_head_rotation_y | Decimalmin 0 | 30 | Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Iron Golem uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.offer_flower": {
"filters": {
"test": "is_daytime"
},
"priority": 5
}
}Used by 1
Vanilla entities with minecraft:behavior.offer_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.take_flowerbehavior.trade_with_playerbehavior.celebrate_survivebehavior.controlled_by_playerbehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interest