#How do you make an item unbreakable via custom enchant?

1 messages · Page 1 of 1 (latest)

covert glacierBOT
#

<@&1201956957406109788>

Someone will come and help soon!

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

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

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

modern zinc
#

You shouldn't use an enchantment for this, you should just use the unbreakable component

#

Like this: give @s iron_sword[unbreakable={}]

lean crypt
#

If you really want to use an enchantment, you could also set the damage the item receives to 0.

"effects": {
    "minecraft:item_damage": [
      {
        "effect": {
          "type": "minecraft:set",
          "value": 0
        }
      }
    ]
  }
#

Although I also suggest using the unbreakable flag.

ocean walrus
#

is it possible to add the unbreakable flag via enchants?

#

what if you disenchant it ?

lean crypt
#

you can use the tick effect with a function call to add the flag but when disenchanting it's indeed a bit more difficult to remove unbreakable.

ocean walrus
#

okay thanks

trim flare
#

imagine this is a fancy embed which says “closed post”