avoid unnecessary object allocation

This commit is contained in:
Matthias Mann committed 2015-11-13 09:03:54 +01:00
1 parent c1e697feb7
commit ab633fb419
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());