diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2016-10-22 23:19:32 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2016-10-23 10:58:15 +0200 |
commit | 19864945085b24d72bf78c44612c08359035c692 (patch) | |
tree | ae87dc0694624fe13de321fa2d0a4507eb9f568e /src/main/java | |
parent | fa1df2a6a83980d6bf49f65a2f85d1909c9dbdbc (diff) | |
download | GT5-Unofficial-19864945085b24d72bf78c44612c08359035c692.tar.gz GT5-Unofficial-19864945085b24d72bf78c44612c08359035c692.tar.bz2 GT5-Unofficial-19864945085b24d72bf78c44612c08359035c692.zip |
Try to move full stack into targed inventory, not single operation.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 8c86519d98..50e16aeae2 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -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) { |