minecraft:durability_sensor for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
durability_thresholds | minecraft:durability_sensor durability_threshold[] | none | List 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": []
}
}