mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Merge pull request #1543 from MatthiasMann/master
avoid unnecessary object allocation
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user