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

minecraft:durability_sensor

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

Overview

minecraft:durability_sensor is an item component: it goes in the components object of a custom item. Plays particles or sounds when the item's durability drops below set levels, like a warning that it is about to break. Needs minecraft:durability.

Fields

FieldTypeDefaultDescription
durability_thresholdsminecraft:durability_sensor durability_threshold[]noneList of durability levels and the particle or sound to play when each is reached. If several are reached at once, only the lowest one plays.

Example

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

BP/items/<name>.json
{
  "minecraft:durability_sensor": {
    "durability_thresholds": []
  }
}

Items: Behavior pack

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