Merge pull request #1543 from MatthiasMann/master

avoid unnecessary object allocation
This commit is contained in:
Vasco Lavos committed 2015-11-13 12:58:43 +00:00
commit d32b47b971
1 file changed
+2 -2
@@ -84,7 +84,7 @@ public class InventoryHelper {
}
int i = 0;
int[] attemptSlots = new int[0];
int[] attemptSlots;
if(inventory instanceof ISidedInventory && side != ForgeDirection.UNKNOWN) {
attemptSlots = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(side.ordinal());
@@ -127,7 +127,7 @@ public class InventoryHelper {
inventory.getSizeInventory();
int itemSizeCounter = item.stackSize;
int[] availableSlots = new int[0];
int[] availableSlots;
if(inventory instanceof ISidedInventory)
availableSlots = ((ISidedInventory) inventory).getAccessibleSlotsFromSide(side.ordinal());