mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Set health before entity death.
This commit is contained in:
1 parent
fbb47e8383
commit
2b6c9f40ae
1 file changed
+2
-2
@@ -99,11 +99,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
|
||||
}
|
||||
|
||||
getHandle().setHealth((float) health);
|
||||
|
||||
if (health == 0) {
|
||||
getHandle().die(DamageSource.GENERIC);
|
||||
}
|
||||
|
||||
getHandle().setHealth((float) health);
|
||||
}
|
||||
|
||||
public double getMaxHealth() {
|
||||
|
||||
Reference in new issue
Block a user