Changed to Null ItemStack instead of null.

This commit is contained in:
yueh
2016-12-21 20:27:23 +01:00
parent ed9e6dd21c
commit 1cde7bc933
36 changed files with 95 additions and 78 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor
@Override
public ItemStack removeStackFromSlot( final int i )
{
return null;
return ItemStack.EMPTY;
}
@Override
+1 -1
View File
@@ -110,7 +110,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
final IStackSrc src = ITEM_STACKS.get( obj.getClass() );
if( src == null )
{
return null;
return ItemStack.EMPTY;
}
return src.stack( 1 );
}
@@ -174,13 +174,13 @@ public class AppEngInternalAEInventory implements IInventory, Iterable<ItemStack
return ns;
}
return null;
return ItemStack.EMPTY;
}
@Override
public ItemStack removeStackFromSlot( final int var1 )
{
return null;
return ItemStack.EMPTY;
}
@Override
@@ -99,7 +99,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
return ns;
}
return null;
return ItemStack.EMPTY;
}
protected boolean eventsEnabled()
@@ -110,7 +110,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
@Override
public ItemStack removeStackFromSlot( final int var1 )
{
return null;
return ItemStack.EMPTY;
}
@Override
@@ -46,19 +46,19 @@ public class AppEngNullInventory implements IInventory
@Override
public ItemStack getStackInSlot( final int var1 )
{
return null;
return ItemStack.EMPTY;
}
@Override
public ItemStack decrStackSize( final int slot, final int qty )
{
return null;
return ItemStack.EMPTY;
}
@Override
public ItemStack removeStackFromSlot( final int var1 )
{
return null;
return ItemStack.EMPTY;
}
@Override
@@ -172,7 +172,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
case TRASH:
default:
return null;
return ItemStack.EMPTY;
}
}
@@ -314,7 +314,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
public ItemStack getStackInSlot( int slot )
{
// The void slot never has any content
return null;
return ItemStack.EMPTY;
}
@Override
@@ -328,13 +328,13 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
{
addPower( stack.getCount() );
}
return null;
return ItemStack.EMPTY;
}
@Override
public ItemStack extractItem( int slot, int amount, boolean simulate )
{
return null;
return ItemStack.EMPTY;
}
@Override
@@ -672,7 +672,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
{
return inv.getStackInSlot( extractSlot );
}
return null;
return ItemStack.EMPTY;
}
@Override
@@ -708,7 +708,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
if( slot != validExtractSlot || amount == 0 )
{
return null;
return ItemStack.EMPTY;
}
AdaptorIInventory adapter = new AdaptorIInventory( new WrapperInventoryRange( TileInscriber.this, extractSlot, 1, true ) );
@@ -1,3 +1,21 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.tile.powersink;
@@ -700,7 +700,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
{
return this.storageType;
}
return null;
return ItemStack.EMPTY;
}
@Override