aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r--src/main/java/gregtech/api/util/GT_LanguageManager.java2
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java
index b44b6ffa40..c87e0f7417 100644
--- a/src/main/java/gregtech/api/util/GT_LanguageManager.java
+++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java
@@ -323,7 +323,7 @@ public class GT_LanguageManager {
addStringLocalization("Interaction_DESCRIPTION_Index_214", "Connected");
addStringLocalization("Interaction_DESCRIPTION_Index_215", "Disconnected");
addStringLocalization("Interaction_DESCRIPTION_Index_216", "Deprecated Recipe");
- addStringLocalization("Interaction_DESCRIPTION_Index_217", "Stocking mode. Keeps this many items in destination input slots.");
+ addStringLocalization("Interaction_DESCRIPTION_Index_217", "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.");
addStringLocalization("Interaction_DESCRIPTION_Index_218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.");
addStringLocalization("Interaction_DESCRIPTION_Index_500", "Fitting: Loose - More Flow");
addStringLocalization("Interaction_DESCRIPTION_Index_501", "Fitting: Tight - More Efficiency");
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 6df77f16bf..a65ed00aed 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -547,7 +547,7 @@ public class GT_Utility {
for (int i = 0; i < tGrabSlots.length; i++) tGrabSlots[i] = i;
}
- if (aTileEntity2 != null && aTileEntity2 instanceof IInventory) {
+ if (aTileEntity2 instanceof IInventory) {
int[] tPutSlots = null;
if (aTileEntity2 instanceof ISidedInventory)
tPutSlots = ((ISidedInventory) aTileEntity2).getAccessibleSlotsFromSide(aPutTo);
@@ -561,13 +561,12 @@ public class GT_Utility {
byte tMovedItemCount = 0;
ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlots[i]);
if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, tGrabStack)) {
+ if (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, tGrabStack)) {
for (int j = 0; j < tPutSlots.length; j++) {
if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, tGrabStack, aMaxTargetStackSize)) {
tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce);
- if (tMovedItemCount >= aMaxMoveAtOnce) {
+ if (tMovedItemCount >= aMaxMoveAtOnce ||(tMovedItemCount > 0 && aMaxTargetStackSize < 64))
return tMovedItemCount;
- }
}
}
}