PaperMC/paper-server/nms-patches/EntityTurtle.patch
CraftBukkit/Spigot d9cf61f1a8 SPIGOT-4101: Turtle lightning strike causing crash
By: md_5 <git@md-5.net>
2018-07-21 14:55:07 +10:00

12 lines
512 B
Diff

--- a/net/minecraft/server/EntityTurtle.java
+++ b/net/minecraft/server/EntityTurtle.java
@@ -260,7 +260,9 @@
}
public void onLightningStrike(EntityLightning entitylightning) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = entitylightning; // CraftBukkit
this.damageEntity(DamageSource.LIGHTNING, Float.MAX_VALUE);
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
}
public void die(DamageSource damagesource) {