How to Detect Durability Change in Item? (Both Armor and Tools, Weapons, Shields)

Started by Lil Shoosh on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to Detect Durability Change in Item? (Both Armor and Tools, Weapons, Shields)
Tue, 05/16/2023 - 20:38 (edited)

Heyo!

I am looking to create a trigger that detects a change in the durability of a given item. 

For example, if an armor piece being worn changes in its durability, the procedure will detect that, allowing me to use it as a trigger for a further procedure. 

I considered using "player tick update" or "world tick update," but neither of them allow for itemstack dependencies. 

 

What should I do?

 

Thanks!

Edited by Lil Shoosh on Tue, 05/16/2023 - 20:38
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is what came up when I…
Thu, 05/25/2023 - 08:12

This is what came up when I created an armor

Any item will have a tick event trigger for when it's in the inventory, you just have to make it. For armor, it's just a tick event for when it's in a slot. All of those allow for itemstack because they're designed to be that way. Then, start your procedure like this and go from there: