How can I make a custom enchantment such that every mob I hit will be struck by lightning?

Started by Python_pro_but… on

Topic category: Help with Minecraft modding (Java Edition)

How can I make a custom enchantment such that every mob I hit will be struck by lightning?

I am working on the enchantment described in the title, but I don't know how I can add the lightning part of the enchant, I made a procedure with no extra triggers that channels lightning at pos x,y,z. Plz help, thanks!