Update for minor remapping changes.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2015-07-30 16:56:52 +10:00
parent 332e77d249
commit c35a7254c5
24 changed files with 135 additions and 189 deletions

View File

@@ -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