Give player explosion immunity when using item?

Started by donPaolo43 on

Topic category: Help with modding (Java Edition)

Last seen on 10:08, 19. 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 17:46, 25. 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)