minecraft:behavior.take_flower for you with a switch.Get GodCraftOverview
minecraft:behavior.take_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 take a flower from a mob that is offering one with offer_flower. Villager children use it with iron golems.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
speed_multiplier | number | 0.5 | Speeds the mob up or slows it down while this goal runs: 1 is normal speed.Range: 0 to … |
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. |
min_wait_time | number | 4 | Shortest random wait, in seconds, before taking the flower.Range: 0 to … |
max_wait_time | number | 20 | Longest random wait, in seconds, before taking the flower.Range: 0 to … |
search_area | vec3 | [6,2,6] | Size of the box around the mob used to find a mob offering a flower. |
max_rotation_x | number | 30 | How far, in degrees, the mob can tilt up or down while looking at the other mob. |
max_head_rotation_y | number | 30 | How far, in degrees, the mob can turn its head sideways while looking at the other mob. |
min_distance_to_target | number | 2 | How close the mob must get to count as having reached the other mob. |
on_take_flower | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that runs when the mob takes the flower. |
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.take_flower": {
"speed_multiplier": 0.5,
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"min_wait_time": 4,
"max_wait_time": 20,
"search_area": [
6,
2,
6
],
"max_rotation_x": 30,
"max_head_rotation_y": 30,
"min_distance_to_target": 2
}
}