Started by
Unmiet
on
Topic category: Help with Minecraft modding (Java Edition)
I wanted to make a sword that, when the player is holding it, makes them invulnerable to any kind of damage. But by "invulnerable," I mean invulnerable in the sense that the player doesn't take any damage at all; the player has no damage animation. If someone attacks them, it's as if they were attacking a player in creative mode—nothing happens. Can someone give me a hand here please?
I managed to creative this through a procedure using the "When In Inventory Tick" tool trigger.
You could try creating a potion effect and procedure with a global trigger "Entity is attacked" and add "If entity has active potion <effect name> do Cancel event that triggered global trigger"