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 committed by Technus
parent fa1df2a6a8
commit 1986494508

View file

@ -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) {