From 2749adcc06b72059808da5e74b80432016aeb874 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Tue, 17 Mar 2015 15:30:40 -0400 Subject: [PATCH] Made sure transporters check strict inventory stack limits, fixed the AE2 interaction --- .../common/content/transporter/TransporterManager.java | 8 ++++---- src/main/java/mekanism/common/util/InventoryUtils.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/mekanism/common/content/transporter/TransporterManager.java b/src/main/java/mekanism/common/content/transporter/TransporterManager.java index 4d1de653e..3dc482474 100644 --- a/src/main/java/mekanism/common/content/transporter/TransporterManager.java +++ b/src/main/java/mekanism/common/content/transporter/TransporterManager.java @@ -132,7 +132,7 @@ public class TransporterManager testInv[i] = toInsert; return; } - else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inv.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { @@ -188,7 +188,7 @@ public class TransporterManager testInv[slotID] = toInsert; return; } - else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inv.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { @@ -288,7 +288,7 @@ public class TransporterManager { return null; } - else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { @@ -326,7 +326,7 @@ public class TransporterManager { return null; } - else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(InventoryUtils.areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { diff --git a/src/main/java/mekanism/common/util/InventoryUtils.java b/src/main/java/mekanism/common/util/InventoryUtils.java index d355df309..b692e096a 100644 --- a/src/main/java/mekanism/common/util/InventoryUtils.java +++ b/src/main/java/mekanism/common/util/InventoryUtils.java @@ -95,7 +95,7 @@ public final class InventoryUtils inventory.setInventorySlotContents(i, toInsert); return null; } - else if(areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { @@ -151,7 +151,7 @@ public final class InventoryUtils inventory.setInventorySlotContents(slotID, toInsert); return null; } - else if(areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(areItemsStackable(toInsert, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + toInsert.stackSize <= inSlot.getMaxStackSize()) { @@ -398,7 +398,7 @@ public final class InventoryUtils { return true; } - else if(areItemsStackable(itemStack, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(areItemsStackable(itemStack, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + itemStack.stackSize <= inSlot.getMaxStackSize()) { @@ -444,7 +444,7 @@ public final class InventoryUtils { return true; } - else if(areItemsStackable(itemStack, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize()) + else if(areItemsStackable(itemStack, inSlot) && inSlot.stackSize < inSlot.getMaxStackSize() && inSlot.stackSize < inventory.getInventoryStackLimit()) { if(inSlot.stackSize + itemStack.stackSize <= inSlot.getMaxStackSize()) {