跳转至

Damage Absorption

文档版本:1.21.50.25

It allows an item to absorb damage that would otherwise be dealt to its wearer. For this to happen, the item needs to be equipped in an armor slot. The absorbed damage reduces the item's durability, with any excess damage being ignored. Because of this, the item also needs a minecraft:durability component.

架构

minecraft:damage_absorption:
{
  array "absorbable_causes" : opt
  {
    entity_damage_source "<any array element>"
  }
}
absorbable_causesarray
List of damage causes that can be absorbed by the item. By default, no damage cause is absorbed.
absorbable_causes
<any array element>entity_damage_source
entity_damage_source:
string