How do i make an item lose durability and give a potion effect when right clicked?

Started by SplEkoGames on

Topic category: Help with modding (Java Edition)

Last seen on 17:53, 1. Apr 2023
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make an item lose durability and give a potion effect when right clicked?

I know there is a dupe post already, but that is from 4 years ago and is not helpful. So can someone help? preferrable can you attach an image?

Last seen on 00:42, 10. Oct 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Imgur: The magic of theā€¦
Sat, 12/31/2022 - 21:44

Imgur: The magic of the Internet

Just replace the diamond sword with a different item.

damage provided itemstack by 1 is removing 1 durability.

200 ticks is 10 seconds