minecraft:combat_regeneration for you with a switch.Get GodCraftOverview
minecraft:combat_regeneration is an entity component: it goes in the components object of a custom mob, or in one of its component groups. When this mob's target is killed, the killer gets Regeneration I and loses Mining Fatigue. Used by wolves to heal after a fight.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
apply_to_family | Boolean | "false" | Also gives the buff to mobs of the same type that make the kill. |
apply_to_self | Boolean | "false" | Gives the buff to this mob when it makes the kill. |
regeneration_duration | Integer | "5" | Seconds of Regeneration I, or "infinite". |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:combat_regeneration": {
"apply_to_family": "false",
"apply_to_self": "false",
"regeneration_duration": "5"
}
}