Paper/CraftBukkit-Patches/0050-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch

25 lines
1.2 KiB
Diff
Raw Normal View History

2014-03-26 21:34:47 +01:00
From 6f3da57934a1b289299a51da40674325e84cd1ea Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 14 Sep 2013 10:16:38 +1000
Subject: [PATCH] Update Inventory and Health for PlayerConsumeItemEvent
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
2014-03-26 21:34:47 +01:00
index a0f4dfc..1f0e29a 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
2013-12-01 04:40:53 +01:00
@@ -277,6 +277,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
// Update client
if (this instanceof EntityPlayer) {
2013-12-01 04:40:53 +01:00
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
+ // Spigot Start
+ ((EntityPlayer) this).getBukkitEntity().updateInventory();
+ ((EntityPlayer) this).getBukkitEntity().updateScaledHealth();
+ // Spigot End
}
return;
}
--
2014-03-26 21:34:47 +01:00
1.8.5.2.msysgit.0