#How to check if a potion effect is harmful

6 messages · Page 1 of 1 (latest)

river salmon
#

I have checked the posts on Discord, but the examples are only for KJS6. Obviously, the methods in KJS6 no longer apply in KJS7. I haven't gotten Probejs autocompletion, nor have I seen similar methods in the Effect autocompletion. QwQ

gray willowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

river salmon
gaunt cloud
#

check for every harmful effect may be?

fast notch
#

All MobEffects have a function called isBeneficial()
You can get Collection<MobEffectInstance> through EntityLiving#getActiveEffects()
Do note that MobEffect != MobEffectInstance
Iterating over that collection will in turn give you Holder<MobEffect>
You can use https://lexxie.dev/ to make sense of base game & neoforge classes etc

river salmon