minecraft:durability_sensor

Enables an item to emit effects when it receives damage. Because of this, the item also needs a `minecraft:durability` component.

Properties

PropertyTypeDefaultWhat it does
durability_thresholds requiredList of object1 to any entries—The list of both durability thresholds and effects emitted when each threshold is met. When multiple thresholds are met, only the threshold with the lowest durability after applying the damage is considered.
durabilityInteger0The effects are emitted when the item durability value is less than or equal to this value.
particle_typeTextnone, bubble, bubblemanual, crit, blockforcefield, smoke, explode, evaporation, flame, candleflame, lava, largesmoke, reddust, risingborderdust, iconcrack, snowballpoof, largeexplode, hugeexplosion, breezewindexplosion, mobflame, heart, terrain, townaura, portal …"none"Particle effect to emit when the threshold is met.
sound_eventText—Sound effect to emit when the threshold is met. Accepts the name of any sound event defined in `sound_definitions.json`, including the built-in vanilla sound events.

Used by

No vanilla item file in the official samples uses this component. It is still part of the schema, so add-ons can use it.

Related components