Ballancing the Mending Enchantment

Started by Jaw10_ on

Topic category: Help with modding (Java Edition)

Last seen on 15:39, 22. Nov 2023
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ballancing the Mending Enchantment

How would i create a feature that gives the player wither 3 for like 3 seconds if they use a weapon that has mending on? 

I believe that mending is a little op, especially with the sophisticated backpacks mod, and was wondering if it would be possible to give the player an effect every time they use a weapon with the enchantment on, 

 

Thanks In Advance!! 

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would want to make a…
Wed, 11/22/2023 - 20:27

You would want to make a procedure that gives wither to the effect/target entity. For triggering the procedure, you could use the 'before entity is hurt' global trigger to check if the item in the main hand of the source entity has the enchantment; or if each of the items in the armor slot of the event/target entity has mending, and if it does, instead give wither to the event/target entity.

For tools, it's even simpler, just run the procedure using the 'block broken' global trigger, and check if the item in the main hand of the event/target entity had the enchantment.

You may need to add extra checks for the item in the off-hand, if you don't want it to be cheesed. That being said, this sounds kind of harsh. What about cooling down items with mending when they collect experience instead? So you briefly can't use them after they collect EXP?

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can also send screenshots…
Wed, 11/22/2023 - 20:27

I can also send screenshots if that would be helpful, sorry if that sounded a bit dense.