Try to move full stack into targed inventory, not single operation.

This commit is contained in:
Blood-Asp 2016-10-22 23:19:32 +02:00
parent 13180eb4a4
commit 6c4f17d52e

View file

@ -531,16 +531,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) {