跳转至

minecraft:durability

文档版本:1.21.0.24

The durability item component specifies how much damage the item takes before breaking, and allows the item to be combined to repair or augment them.

架构

minecraft:durability:
{
  int_range "damage_chance"
  integer "max_durability" : opt
  integer "max_damage" : opt
}
damage_chanceint_range
Specifies the percentage chance of this item losing durability. Default is set to 100. Defined as an int range with min and max value.
int_range:
{
  integer "max" : opt
  integer "min" : opt
}
maxinteger
mininteger
max_durabilityinteger
Max durability is the amount of damage that this item can take before breaking. This is a required parameter and has a minimum of 0.
max_damageinteger