From 0f33d638d0bf850fbd9ea40008cdc12c17206bfd Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 6 Mar 2019 01:13:47 +0100 Subject: [PATCH] Improve damage handling of dead entities By: Phoenix616 --- paper-server/nms-patches/EntityLiving.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/nms-patches/EntityLiving.patch b/paper-server/nms-patches/EntityLiving.patch index a060dbd3de..3b06b97633 100644 --- a/paper-server/nms-patches/EntityLiving.patch +++ b/paper-server/nms-patches/EntityLiving.patch @@ -492,6 +492,15 @@ } } +@@ -703,7 +903,7 @@ + return false; + } else if (this.world.isClientSide) { + return false; +- } else if (this.getHealth() <= 0.0F) { ++ } else if (this.dead || this.killed || this.getHealth() <= 0.0F) { // CraftBukkit - Don't allow entities that got set to dead/killed elsewhere to get damaged and die + return false; + } else if (damagesource.p() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) { + return false; @@ -958,6 +1191,12 @@ boolean flag = this.lastDamageByPlayerTime > 0;