Started by
Yarpodkovko
on
Topic category: Help with Minecraft modding (Java Edition)
does anyone know how to make it so that when equiping custom armor you get an effect but when you take of the armor the effect disapears until you take the armor back on?
One possible way is to make a procedure and put together code to determine if the player is wearing that armor and if so put the effect on them. There would be different ways to make it more or less efficient but this is possibly one way.
You can use the 'get item from armor slot' block and use it to check if you are wearing the armor. Armor slot 0 is the boots, 1 is leggings, 2 is chestplate, and 3 is helmet. In the 'if' blocks result, put the 'add potion to entity' block and put in the potion you want. If the 'if' condition does not see any armor, add the 'remove specific potion' block.
wait doesn't armor have a "on tick update" just use that and add the effect for a couple of ticks
yes but how do i make it so that it only activates when the full set is equiped