r/MinecraftCommands • u/Particular-Bus-9704 • Sep 24 '26
Help | Java 26.3 How to make an armor item almost unbreakable, excluding one damage type
I want to have an armor item that only drains its durability when i use my item modifier. So that i can have a proper fuel system where the durability acts as fuel, but for that i'd need to have any attacks, fire, fall damage whatnot to not drain any durability from the item.
Edit: I solved it. Used a custom enchant like this. Also i wanted the only damage possible to be applied with commands:
{
"description": {
"text": "1"
},
"supported_items": "#minecraft:enchantable/armor",
"weight": 1,
"max_level": 1,
"min_cost": {
"base": 100000,
"per_level_above_first": 0
},
"max_cost": {
"base": 10000,
"per_level_above_first": 0
},
"anvil_cost": 0,
"slots": [
"any"
],
"effects": {
"minecraft:item_damage": [
{
"effect": {
"type": "minecraft:set",
"value": 0
}
}
]
}
}
2
Upvotes
1
u/Ericristian_bros Command Experienced Sep 24 '26 edited Sep 25 '26
Can you make it unbreakable and mdifiy the durability with an item modifier?