Started by
NobodyATL
on
Topic category: Help with Minecraft modding (Java Edition)
So i'm having a small problem
I tried making it give the player some potion effects once the full set was worn but it didn't work. could someone help me with this?
Procedure: TimerStart
Trigger: On player join
Set entity/player number NBT "ModnameTimer" to 0
---
Procedure: TimerTick
Trigger: Every player tick
Set "ModnameTimer" to (Get "ModnameTimer" + 1)
If (Get "ModnameTimer" MOD 50 = 0){ //every 50 ticks
Call 'CheckArmor' procedure
}
---
Procedure: CheckArmor
Trigger: External
If (Wearing set 1) {
apply effects
} else if (Wearing Set 2){
apply other effects
} else if ...
If you have issues with eg. Health Boost or Regen being too powerful, since the apply event can be stronger than a standard tick, then increase the length of the potion effect, and make TimerTick call less, say every 150 ticks (7.5 sec).
Health boost gives empty hearts, here's a workaround to save any extra health
Create a local number variable called "HealthVar"
...
Set "HealthVar" to (current Health of entity)
Apply Health Boost potion effect
Set Health of entity to "HealthVar"
...
See armor slot ids here: