Give player explosion immunity when using item?

Started by donPaolo43 on

Topic category: Help with Minecraft modding (Java Edition)

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

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)