2015-01-05 04:32:01 +01:00
|
|
|
From 18daf09c9f1b8f214badecdeb37764de3e3b07f2 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
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-12-21 02:09:49 +01:00
|
|
|
index b65c225..eaa5879 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2014-12-07 20:26:30 +01:00
|
|
|
@@ -300,6 +300,10 @@ public abstract class EntityHuman extends EntityLiving {
|
2014-07-21 22:46:54 +02:00
|
|
|
// Update client
|
|
|
|
if (this instanceof EntityPlayer) {
|
2014-11-28 02:17:45 +01:00
|
|
|
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.g));
|
2014-07-21 22:46:54 +02:00
|
|
|
+ // Spigot Start
|
|
|
|
+ ((EntityPlayer) this).getBukkitEntity().updateInventory();
|
|
|
|
+ ((EntityPlayer) this).getBukkitEntity().updateScaledHealth();
|
|
|
|
+ // Spigot End
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|