First batch of null -> isEmpty() checks.
I most likely still missed a ton of checks...
This commit is contained in:
@@ -72,7 +72,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
}
|
||||
|
||||
final ItemStack is = this.cell.getStackInSlot( 0 );
|
||||
if( is == null )
|
||||
if( is.isEmpty() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
|
||||
public ICellWorkbenchItem getCell()
|
||||
{
|
||||
if( this.cell.getStackInSlot( 0 ) == null )
|
||||
if( this.cell.getStackInSlot( 0 ).isEmpty() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
boolean cellHasConfig = false;
|
||||
for( int x = 0; x < configInventory.getSizeInventory(); x++ )
|
||||
{
|
||||
if( configInventory.getStackInSlot( x ) != null )
|
||||
if( !configInventory.getStackInSlot( x ).isEmpty() )
|
||||
{
|
||||
cellHasConfig = true;
|
||||
break;
|
||||
@@ -185,7 +185,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
{
|
||||
for( int x = 0; x < this.config.getSizeInventory(); x++ )
|
||||
{
|
||||
this.config.setInventorySlotContents( x, null );
|
||||
this.config.setInventorySlotContents( x, ItemStack.EMPTY );
|
||||
}
|
||||
|
||||
this.markDirty();
|
||||
@@ -219,7 +219,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
}
|
||||
|
||||
final ItemStack is = this.cell.getStackInSlot( 0 );
|
||||
if( is == null )
|
||||
if( is.isEmpty() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user