How can I make my tool not to break at durability 0 or 1, but it would stop working?

Started by Luky_276 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make my tool not to break at durability 0 or 1, but it would stop working?

The title pretty much explains it. I want to make a tool that doesn't break at durability 1 or 0, but I want it to stop working. Thanks in advance.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a new item for the …
Sun, 05/29/2022 - 15:10

Make a new item for the "broken" state then do something like:

 

Global trigger : "Item is destroyed".

If [provided itemstack] = "your tool"

     If [item in main-hand] = [empty itemstack]  (hand should be empty, but verify just in case)

          Set item in main-hand of [event/target entity] to "broken item"

          Copy NBT tags of [provided itemstack] onto [item in main-hand]