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

Started by crowinsanity13 on Wed, 07/28/2021 - 03:10

Topic category: Help with modding (Java Edition)

Last seen on 20:10, 10. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make it to if I attack a mob, my main-hand item gains durability?
Wed, 07/28/2021 - 03:10

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)

Last seen on 16:28, 15. Sep 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 20:10, 10. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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