How do I make it to if I attack a mob, my main-hand item gains durability?

Started by crowinsanity13 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make it to if I attack a mob, my main-hand item gains durability?

I'm experimenting because its my first time with anything like this, but I cant seem to get it right, it always targets the things I want to kill and not myself, I have the blocks that let my weapon's durability go up, but it never targets the player, I'm getting a bit frustrated but its still fun to mess with, think I can get some help here?

(I would show you what the blocks look like, but I change them so often I cant tell what was the original)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When living entity is hit…
Thu, 08/05/2021 - 19:08

When living entity is hit with tool > add durability to tool in hand of source entity. You might need to add 2 durability but im not sure

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you, i found a way to…
Fri, 08/06/2021 - 04:02

thank you, i found a way to do something cooler, but i might use that in another effect