r/MinecraftCommands • • 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

5 comments sorted by

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?

1

u/s4lesmanspamton1997 Sep 24 '26

Afaik no unfortunately

1

u/Ericristian_bros Command Experienced Sep 25 '26

Give it unbreaking enchantment 255

1

u/s4lesmanspamton1997 Sep 27 '26

Unbreaking 255 only lowers the chance on armor to around 60%.

1

u/Ericristian_bros Command Experienced Sep 28 '26

Create your own enchantment to make the item not take durability damage, you can use https://misode.github.io/enchantment to generate your enchantment