minecraft:behavior.drink_potion for you with a switch.Get GodCraftOverview
minecraft:behavior.drink_potion is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob drink potions when its conditions are met, like a witch healing itself.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
speed_modifier | number | 0 | Speed change while drinking. 0 keeps normal speed, negative values slow the mob down. |
potions | DrinkPotionGoalDefinition::PotionData[] | none | The potions the mob can drink, each with its own conditions and chance. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.drink_potion": {
"speed_modifier": 0,
"potions": [],
"priority": 0,
"control_flags": []
}
}