Started by
ryden
on
Topic category: Help with Minecraft modding (Java Edition)
I've created a custom enchantment that summons an explosion when blocking enemy attacks with a shield, but the player usually dies from said explosion. I'm looking for a way to make the explosion not hurt the player. I've heard of a global trigger called "Before Entity is Hurt", yet I cannot find it and I've just assumed it's been removed.
Edited by ryden on Sat, 06/07/2025 - 03:27
I have an idea! Make a procedure that gives the player some kind of OP resistance for 1 or 2 ticks which stops you from taking damage, and then when the explosion ends, you don't have resistance anymore and mobs can attack you.
Well, I am not a MCreator pro or anything, but I hope this will work for you, and if you want I can test out a prototype of my own and send over an image!
Thanks. I was thinking of something like this but unsure of how to go about it. I tested it and it works flawlessly.
You're welcome for the help, glad I could come in handy!