Replace tool with another with the same durability

Started by myxical on

Topic category: Help with modding (Java Edition)

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Replace tool with another with the same durability

I want to make a sword that when right clicked with you can activate it, but the durability will drain each tick. Right clicking it again would deactivate it. Though, I can't find a way to keep the durability of the item. I can do it for blocks, but not tools. Can anyone help?