Help with armor "special stats"

Started by a guy called l… on

Topic category: Help with modding (Java Edition)

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with armor "special stats"

So, im creating a mod that add clases, and want to create armors that provide both unique stats per piece as a full set effect
the full set effect is not hard to make, but the individual stat increase are causing me problems
so, I want to, for example, increase a special "damage stat" by 1% when equiping a helmet
the problem comes that, putting the program just like a "increase "damage stat" by 1" will cause it to go up 1% each tick, and thats not what I want
I could do a program to detect each tick if you have equiped the armor, then add the 1% one time, but, taking in count I want to add multiple classes with multiple armors, that would be to many on tick procedures
So, I have a few ideas, but don't know how to execute them

  1. Make the "damage increase" happend when equiping the piece, and if the piece get removed, remove the damage increase
    I want to make that, but have no idea how, as theres not "on equiping" or "on removing" armor procedures (if there's a plugin that  allows that, please told me, im on mcreator 2023.3)

    2. Make the on tick thing, but making sure to prevent the program for happening under certain conditions
    This is more of a question that anything, having a "if X do Y" program on a on tick procedure, if the "if X do Y" is false, then the procedure could cause rendition problems (if theres multiple of them)?