mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-11 02:37:36 +01:00
SPIGOT-2049: Send the right attributes when updating scaled health
By: Thinkofname <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
2e5cc5e318
commit
3c7782562d
@ -1281,7 +1281,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
public void updateScaledHealth() {
|
public void updateScaledHealth() {
|
||||||
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
|
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
|
||||||
Set set = attributemapserver.getAttributes();
|
Collection set = attributemapserver.c(); // PAIL: Rename
|
||||||
|
|
||||||
injectScaledMaxHealth(set, true);
|
injectScaledMaxHealth(set, true);
|
||||||
|
|
||||||
@ -1289,7 +1289,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().getFoodLevel(), getHandle().getFoodData().getSaturationLevel()));
|
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().getFoodLevel(), getHandle().getFoodData().getSaturationLevel()));
|
||||||
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
|
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
|
||||||
|
|
||||||
set.clear();
|
|
||||||
getHandle().maxHealthCache = getMaxHealth();
|
getHandle().maxHealthCache = getMaxHealth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user