aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2020-11-27 09:18:37 +0100
committerGitHub <noreply@github.com>2020-11-27 09:18:37 +0100
commitff28bfe1ff71ef375c1c31425ebd6b8258ee2a60 (patch)
tree9e12bdfc5d677c389bf45152b212dd729115f6b3 /src/main/java
parenta2fedcfca3d60025533363a9ba776971f0a4bc9e (diff)
parent98e9d3a4a2a9a5246608387d305818c52879c9c8 (diff)
downloadGT5-Unofficial-ff28bfe1ff71ef375c1c31425ebd6b8258ee2a60.tar.gz
GT5-Unofficial-ff28bfe1ff71ef375c1c31425ebd6b8258ee2a60.tar.bz2
GT5-Unofficial-ff28bfe1ff71ef375c1c31425ebd6b8258ee2a60.zip
Merge pull request #354 from GTNewHorizons/fix-infinit-while
fix-infinit-while
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java5
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);