Topic category: Help with Minecraft modding (Java Edition)
Hello,
I a m working on a mod where wearing two pieces of armor of the same material gives you a buffs.
For example : two pieces of strenght armor gives you strenght and two pieces of luck armor gives you luck.
So with these four pieces you get strenght and luck.
I want to make a procedure that check what does the player have equipped. I know I can do that with "on player tick update".
But see here the procedure to check every possibility of having two pieces of the same armor for ONE armor :
If I do that for like 5 different armors, the game will start to lag a lot. Imagine now with a lot of players. How can I make the game check only when the player Equip / Unequip ?
If I do it with "player uses item" I will need to check every piece of every armors, this is more OK I think but still a big check at every armor equip. And the player can also equip with the inventory HUD, dispensers, etc...
What do you think ? Is there a way to not harass the game with that ?
Figured it out myself..