Give player explosion immunity when using item?

Started by donPaolo43 on

Topic category: Help with modding (Java Edition)

Last seen on 17:53, 11. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Give player explosion immunity when using item?

I am making a ranged item that shoots exploding projectiles, but I'd like to make it so that when the projectile generates the explosion the player doesn't receive damage from it. Even giving the player explosion immunity in general would be fine. Thank you

Last seen on 03:28, 11. Apr 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can check if the damage…
Sun, 03/17/2024 - 18:40

you can check if the damage type is explosion, and if it is, cancel it (didn't test this, but it should work)