How to make a lightning protection enchantment for helmets

Started by VaderCraft_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a lightning protection enchantment for helmets
Fri, 01/29/2021 - 02:02 (edited)

I am trying to make an enchantment where it gets rid of lightning damage to the entity that is using the helmet. But, the procedure that I made makes it so that it has to check every single entity if it is being struck by lightning. Therefore, crashing the game/server altogether. So, I have tried making it so that it checks it on player tick, and that doesn't work and it says it doesn't compile properly. Please respond soon.

Edited by VaderCraft_ on Fri, 01/29/2021 - 02:02