mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
avoid unnecessary object allocation
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user