Closed zachoooo closed 7 years ago
I'm not sure I understand your comment about vanilla; does this PR match vanilla behavior?
The damage matches vanilla behavior, I couldn't find values online for the correct distances or ignition period.
"Lightning striking on or near the player will do 5 (Heart.svgHeart.svgHalf Heart.svg) damage, which can be reduced with armor (enchanted or not). Lightning strikes on the player are very rare, and only occur during thunderstorms. Mobs/players that get hit by lightning will be set on fire, but will be quickly put out from the rain during a thunderstorm."
Oh I see, I just need to update it to take armor into account.
You can easily use Location#distanceSquared to increase performance.
@Tonodus They aren't technically needed, just a good comment explaining the squared-ness of the values.
based off of their distance to the strike. Damage in minecraft for lightning strikes is consistent and is set to 5 hearts. Damage distance, ignition distance, and ignition period are approximate.