Trying to make an Unbreakable enchantment

Started by mobjack878 on

Topic category: Help with modding (Java Edition)

Last seen on 21:11, 14. Sep 2023
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to make an Unbreakable enchantment

I'm trying to make a treasure enchantment you can apply to any item with durability that makes it Unbreakable. I don't really know what I'm doing. I got the enchantment book to appear in the creative inventory and it can be applied to items. What event trigger should I use? I didn't see a trigger related to using an anvil. Also, how do I refer to the player? It gets mad at me for trying to refer to the item in the main hand of an entity that doesnt exist.

 

Last seen on 21:37, 17. Feb 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try "on player tick update"…
Fri, 09/15/2023 - 15:08

Try "on player tick update" and for all slots in the player's inventory, if it has the enchantment, reset durability.