how to make a player immune to lightning

Started by coolguy11110101338 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a player immune to lightning

Hi! Im making a sword that summons lightning, but want to make sure the player wont take damage from it when it is held in hand. So i saw similar forum discussions on this, and they say to set up an "entity is hurt" procedure and then cancel it if the damage type is lightning. However, it looks like, as of recently, the "Entity is hurt" trigger is not cancellable. Is there any other way to make the player immune to lightning?

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know. i cancel when…
Sat, 06/28/2025 - 21:04

I don't know. i cancel when entity is hurt all the time and it works fine.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use the "entity struck by…
Sat, 06/28/2025 - 23:50

use the "entity struck by lighting" trigger instead