#Durability item modifiers with unbreaking

1 messages · Page 1 of 1 (latest)

bright rain
#

Right now I have a modifier like this that chunks 1/4th of the item's durability (it triggers when I use it). However, Unbreaking doesn't prevent any durability loss at all when this modifier is applied. How do I make it interact with Unbreaking?

onyx pendantBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1726394011:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1282200600989138974

low bear
#

not perfect but the simplest way:

[
  {
    "function": "minecraft:set_damage",
    "damage": -0.25,
    "add": true,
    "conditions": [
      {
        "condition": "minecraft:random_chance_with_enchanted_bonus",
        "enchantment": "minecraft:unbreaking",
        "unenchanted_chance": 1,
        "enchanted_chance": 0.5
      }
    ]
  }
]
bright rain
signal grail
#

Yeah I think it requires a specific loot context

bright rain
#

why doesn't this game have something as simple as 'damage durability by an absolute x'

#

outside of enchantments

bright rain
#

now to think about 8 predicates for main hand + offhand x 4 levels of unbreaking, and 128+ lines of durability code...

bright rain
#

oh yeah I think I made it...

#

now to discard the item once it's used up its durability

bright rain
#

okay it is finished thank you all for watching