mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:25:03 +01:00
SPIGOT-1613: Fix missed use of scaled health
By: md_5 <git@md-5.net>
This commit is contained in:
parent
819131cad1
commit
6d76250ec1
1 changed files with 9 additions and 0 deletions
|
@ -103,6 +103,15 @@
|
||||||
this.playerInteractManager.a();
|
this.playerInteractManager.a();
|
||||||
--this.invulnerableTicks;
|
--this.invulnerableTicks;
|
||||||
if (this.noDamageTicks > 0) {
|
if (this.noDamageTicks > 0) {
|
||||||
|
@@ -192,7 +251,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.getHealth() != this.lastHealthSent || this.cb != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.cc) {
|
||||||
|
- this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel()));
|
||||||
|
+ this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel())); // CraftBukkit
|
||||||
|
this.lastHealthSent = this.getHealth();
|
||||||
|
this.cb = this.foodData.getFoodLevel();
|
||||||
|
this.cc = this.foodData.getSaturationLevel() == 0.0F;
|
||||||
@@ -213,6 +272,12 @@
|
@@ -213,6 +272,12 @@
|
||||||
this.a(IScoreboardCriteria.i, MathHelper.f((float) this.bW));
|
this.a(IScoreboardCriteria.i, MathHelper.f((float) this.bW));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue