minecraft:damage_absorption for you with a switch.Get GodCraftOverview
minecraft:damage_absorption is an item component: it goes in the components object of a custom item. Lets armor take some kinds of damage instead of the wearer. The item must be worn in an armor slot and needs minecraft:durability, because the soaked up damage wears the item down.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
absorbable_causes | string[] | none | Damage causes this item soaks up, for example "entity_attack". Nothing is absorbed if the list is empty. |
Example
Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):
BP/items/<name>.json
{
"minecraft:damage_absorption": {
"absorbable_causes": []
}
}