Started by
Tiny Desk Engineer
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to create a potion effect that prevent any entity that has it from taking any damage whatsoever, until the effect runs out. Like a really high level of Resistance. I think canceling any "Before entity is hurt" events on any entity with the effect would do what I want it to do, but I can't figure out how to check if the entity actually has the effect.
Just use an if bracket, and the 'does entity have potion effect' logic function. It's in the entity data tab. You could also use the 'remaining ticks of potion effect' number function. Canceling the 'before entity is hurt' event should work.