Try to move full stack into targed inventory, not single operation.
This commit is contained in:
parent
13180eb4a4
commit
6c4f17d52e
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue