Started by
ScottishFrogg
on
Topic category: Help with Minecraft modding (Java Edition)
I coded in a armor that gives you a different effect for wearing each piece. I need help clearing the effects when I take the armor off.
Topic category: Help with Minecraft modding (Java Edition)
I coded in a armor that gives you a different effect for wearing each piece. I need help clearing the effects when I take the armor off.
Use the trigger when armor equipped tick
Set it to
(If):(Not(Is provided world client-side))
Do:(Apply potion effect(your effect) to (event/target entity) for (2) ticks amplifier(number)
I apologize if I wrote the wrong name, but there are procedure blocks similar to what I wrote.
The if not provided word client-side is to stop a bug from happening where the bug stays infinitely
You mean the set armor slot thing?
I don't fully understand your second question, so i will try to give as much clarity as possible.
By when armor equiped tick I meant "(Armor) tick event" (Helmet tick event, Chestplate tick event, ect.)
The apply potion effect block that I used starts with "Add potion" then the required fields.
Basically the procedure I gave is so that when you wear the custom armor(with procedure on it) you will get a potion effect that stays as long as the armor is equipped, then after the armor is taken off there is only enough duration left on the potion effect that it will only last for a split-second before expiring.
The is not client-side part is to stop a very specific bug from happening.
The potion effect stays on because it is constantly re-applied every tick while you have the armor equipped(20 ticks=1 second)