minecraft:behavior.offer_flower for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
max_offer_flower_duration | number | 20 | Longest time, in seconds, the mob holds out the flower.Range: 0 to … |
chance_to_start | number | 0.000125 | Chance from 0 to 1 that the goal starts. 1 means every time.Range: 0 to 1 |
filters | Filter 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_area | vec3 | [6,2,6] | Size of the box around the mob used to find someone to offer the flower to. |
max_rotation_x | number | 30 | How far, in degrees, the mob can tilt up or down while looking at the other mob.Range: 0 to … |
max_head_rotation_y | number | 30 | How far, in degrees, the mob can turn its head sideways while looking at the other mob.Range: 0 to … |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists 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": []
}
}