Started by
CoolGuy97
on
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to make the player immune to explosions like using an attribute or preferably a potion effect
What I’ve tried is a before entity is hurt>if entity is player>if damage type is explosion>return FAIL
But I don’t think it works and it could probably be more efficient
Thanks, i need to know for my new superhero mod!!!
this seems to work quite nicely
What’s in the snippets?? Thank you
wdym what's in the snippet?
Like what IS the custom code snippet and why do I need them and also if I do need them what’s the cancel event for? Shouldn’t I just use it?
The custom code snippets run java code. And yes you do need the cancel event block.
You can also, if you want, just nest it instead of using guard clauses as that doesn't require and custom code snippets.
I'm pretty sure that the only code in the snippets is 'return;'