diff options
author | md_5 <git@md-5.net> | 2016-11-20 14:13:21 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-20 14:13:21 +1100 |
commit | ac99d7d47480adf589a661f00a4acf0879f48ed7 (patch) | |
tree | 01f4b05bf238348d64ce205089eab756e592b58f | |
parent | 95436219a588cec7497112c879487ce5d5cec73a (diff) | |
download | craftbukkit-ac99d7d47480adf589a661f00a4acf0879f48ed7.tar craftbukkit-ac99d7d47480adf589a661f00a4acf0879f48ed7.tar.gz craftbukkit-ac99d7d47480adf589a661f00a4acf0879f48ed7.tar.lz craftbukkit-ac99d7d47480adf589a661f00a4acf0879f48ed7.tar.xz craftbukkit-ac99d7d47480adf589a661f00a4acf0879f48ed7.zip |
SPIGOT-2807: Update inventory when attack cancelled
-rw-r--r-- | nms-patches/EntityHuman.patch | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch index d0e1cf94..19bc4b5f 100644 --- a/nms-patches/EntityHuman.patch +++ b/nms-patches/EntityHuman.patch @@ -332,7 +332,19 @@ } if (this.world instanceof WorldServer && f4 > 2.0F) { -@@ -1118,6 +1243,20 @@ +@@ -1028,6 +1153,11 @@ + if (flag4) { + entity.extinguish(); + } ++ // CraftBukkit start - resync on cancelled event ++ if (this instanceof EntityPlayer) { ++ ((EntityPlayer) this).getBukkitEntity().updateInventory(); ++ } ++ // CraftBukkit end + } + } + +@@ -1118,6 +1248,20 @@ this.stopRiding(); } @@ -353,7 +365,7 @@ this.setSize(0.2F, 0.2F); if (this.world.isLoaded(blockposition)) { float f = 0.5F + (float) enumdirection.getAdjacentX() * 0.4F; -@@ -1177,6 +1316,23 @@ +@@ -1177,6 +1321,23 @@ this.world.everyoneSleeping(); } @@ -377,7 +389,7 @@ this.sleepTicks = flag ? 0 : 100; if (flag2) { this.setRespawnPosition(this.bedPosition, false); -@@ -1228,9 +1384,11 @@ +@@ -1228,9 +1389,11 @@ if (blockposition != null) { this.e = blockposition; this.f = flag; |