1. Wiki
  2. /Items
  3. /minecraft:durability

minecraft:durability

Don't want to write this by hand? GodCraft sets minecraft:durability for you with a switch.Get GodCraft

Overview

minecraft:durability is an item component: it goes in the components object of a custom item. Gives the item a health bar that goes down as it is used, until it breaks. It also allows repairing and combining two worn items in an anvil or grindstone.

Fields

FieldTypeDefaultDescription
max_durabilityintegernoneHow many uses the item survives before it breaks.Range: 0 to …
damage_chanceIntRange{"max":100,"min":100}Percent chance (as a min and max range) that a use actually wears the item down. Lower it to make the item last longer.

Example

Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):

BP/items/<name>.json
{
  "minecraft:durability": {
    "max_durability": 0,
    "damage_chance": {
      "max": 100,
      "min": 100
    }
  }
}

Items: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more