3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Improve damage handling of dead entities

Dieser Commit ist enthalten in:
Phoenix616 2019-03-06 01:13:47 +01:00 committet von md_5
Ursprung 1dbe87c8cc
Commit 73597ed865

Datei anzeigen

@ -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 @@ @@ -958,6 +1191,12 @@
boolean flag = this.lastDamageByPlayerTime > 0; boolean flag = this.lastDamageByPlayerTime > 0;