mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-19 03:39:18 +00:00
Fix shift-clicking discarding the remainder when it could fill up another stack
This commit is contained in:
1 parent
de49958657
commit
8461f768d7
1 file changed
+5
-2
@@ -190,8 +190,11 @@ public abstract class BaseContainer<T extends TileEntity & IInventory> extends C
|
||||
|
||||
// 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
|
||||
|
||||
Reference in new issue
Block a user