summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-06 08:38:01 +1100
committermd_5 <git@md-5.net>2016-03-06 08:38:01 +1100
commitac251f0cf9767e97ebdf1664c26cc9a565298843 (patch)
treed1f36822baafdb9c6859ca9ccb5800c2bf9ed903
parent45171f086413936099a2335ca32dbdc129cf640e (diff)
downloadcraftbukkit-ac251f0cf9767e97ebdf1664c26cc9a565298843.tar
craftbukkit-ac251f0cf9767e97ebdf1664c26cc9a565298843.tar.gz
craftbukkit-ac251f0cf9767e97ebdf1664c26cc9a565298843.tar.lz
craftbukkit-ac251f0cf9767e97ebdf1664c26cc9a565298843.tar.xz
craftbukkit-ac251f0cf9767e97ebdf1664c26cc9a565298843.zip
SPIGOT-1613: Fix missed use of scaled health
-rw-r--r--nms-patches/EntityPlayer.patch9
1 files changed, 9 insertions, 0 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch
index a2a0b344..71a2a747 100644
--- a/nms-patches/EntityPlayer.patch
+++ b/nms-patches/EntityPlayer.patch
@@ -103,6 +103,15 @@
this.playerInteractManager.a();
--this.invulnerableTicks;
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 @@
this.a(IScoreboardCriteria.i, MathHelper.f((float) this.bW));
}