How to make a lightning protection enchantment for helmets

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

Topic category: Help with modding (Java Edition)

Last seen on 13:21, 23. Jan 2022
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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