@@ -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
|
||||
|
||||
Reference in New Issue
Block a user