summaryrefslogtreecommitdiffstats
path: root/nms-patches/Container.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/Container.patch')
-rw-r--r--nms-patches/Container.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/Container.patch b/nms-patches/Container.patch
index 84210f03..55fe26c7 100644
--- a/nms-patches/Container.patch
+++ b/nms-patches/Container.patch
@@ -110,12 +110,12 @@
}
if (j == 1) {
-- entityhuman.drop(playerinventory.getCarried().a(1), true);
+- entityhuman.drop(playerinventory.getCarried().cloneAndSubtract(1), true);
- if (playerinventory.getCarried().count == 0) {
+ // CraftBukkit start - Store a reference
+ ItemStack itemstack4 = playerinventory.getCarried();
+ if (itemstack4.count > 0) {
-+ entityhuman.drop(itemstack4.a(1), true);
++ entityhuman.drop(itemstack4.cloneAndSubtract(1), true);
+ }
+
+ if (itemstack4.count == 0) {
@@ -136,7 +136,7 @@
} else if (slot2.isAllowed(entityhuman)) {
if (itemstack4 == null) {
@@ -249,7 +315,11 @@
- itemstack4.a(k1);
+ itemstack4.cloneAndSubtract(k1);
if (itemstack4.count == 0) {
playerinventory.setCarried((ItemStack) null);
+ // CraftBukkit start - Update client cursor if we didn't empty it