diff options
author | botn365 <42187820+botn365@users.noreply.github.com> | 2020-11-27 00:24:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-27 00:24:32 +0100 |
commit | 98e9d3a4a2a9a5246608387d305818c52879c9c8 (patch) | |
tree | a10b6301f36eeadebcefcdd31a1f04062617d3f1 /src/main/java/gregtech/api/util | |
parent | a65bc5d9189095398d85b36cb0e2890ef5f106ce (diff) | |
download | GT5-Unofficial-98e9d3a4a2a9a5246608387d305818c52879c9c8.tar.gz GT5-Unofficial-98e9d3a4a2a9a5246608387d305818c52879c9c8.tar.bz2 GT5-Unofficial-98e9d3a4a2a9a5246608387d305818c52879c9c8.zip |
fix-infinit-while
fix porention infinit while loop wit barrels/drawers
Diffstat (limited to 'src/main/java/gregtech/api/util')
-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 b06cc1d82a..05e0874e7a 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -546,13 +546,14 @@ public class GT_Utility { for (int tGrabSlot = 0;tGrabSlot<tGrabInventorySize;tGrabSlot++) { //ItemStack tInventoryStack : mInventory - int tMovedItems = 0; + int tMovedItems; do { + tMovedItems = 0; ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlot); if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter) && (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack))) { int tStackSize = tGrabStack.stackSize; - tMovedItems = 0; + for (int tPutSlot = tFirstsValidSlot; tPutSlot < tPutInventorySize; tPutSlot++) { if (isAllowedToPutIntoSlot(tPutInventory, tPutSlot, aPutTo, tGrabStack, (byte) 64)) { int tMoved = moveStackFromSlotAToSlotB(aTileEntity1, tPutInventory, tGrabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItems), aMinMoveAtOnce); |