Started by
Reandom
on
Topic category: Help with Minecraft modding (Java Edition)
I'm creating a mod that adds special items that when right-clicked give an effect to the player, one of these items gives invisibility and I wanted the player's armor to become invisible when the item was used, can someone help me?
After contemplating your idea, I've devised an answer.
Make 4 itemstack global/local variable(someting like playerHelmet, playerChestplate, playerLegging and playerBoots) and set the player's helmet, chestplate, legging and boots to their respective variable.
Make a local/global variable(called someting like basePlayerArmor or...) and save the player's current armor into that variabe, then remove your player's armor and set attribute armor to basePlayerArmor and when the effect ends, set their armor to playerHelmet, playerChestplate, playerLeggings and playerBoots.
If you need an image, just ask.