Try to move full stack into targed inventory, not single operation.
This commit is contained in:
parent
fa1df2a6a8
commit
1986494508
1 changed files with 3 additions and 2 deletions
|
@ -537,16 +537,17 @@ public class GT_Utility {
|
|||
}
|
||||
|
||||
for (int i = 0; i < tGrabSlots.length; i++) {
|
||||
byte tMovedItemCount = 0;
|
||||
for (int j = 0; j < tPutSlots.length; j++) {
|
||||
if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) {
|
||||
if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, aTileEntity1.getStackInSlot(tGrabSlots[i]))) {
|
||||
if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, aTileEntity1.getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) {
|
||||
byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
|
||||
if (tMovedItemCount > 0) return tMovedItemCount;
|
||||
tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tMovedItemCount > 0) return tMovedItemCount;
|
||||
}
|
||||
|
||||
if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) {
|
||||
|
|
Loading…
Reference in a new issue