Skip to content

Commit

Permalink
Fix shift-clicking discarding the remainder when it could fill up ano…
Browse files Browse the repository at this point in the history
…ther stack
  • Loading branch information
bonii-xx committed Mar 4, 2016
1 parent de49958 commit 8461f76
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ else if(!this.mergeItemStack(itemstack1, 0, playerInventoryStart, false)) {

// Fix for a vanilla bug: doesn't take Slot.getMaxStackSize into account
protected boolean mergeItemStack(ItemStack stack, int startIndex, int endIndex, boolean useEndIndex) {
return mergeItemStackRefill(stack, startIndex, endIndex, useEndIndex)
|| mergeItemStackMove(stack, startIndex, endIndex, useEndIndex);
boolean ret = mergeItemStackRefill(stack, startIndex, endIndex, useEndIndex);
if(stack != null && stack.stackSize > 0) {
ret |= mergeItemStackMove(stack, startIndex, endIndex, useEndIndex);
}
return ret;
}

// only refills items that are already present
Expand Down

0 comments on commit 8461f76

Please sign in to comment.