First batch of null -> isEmpty() checks.

I most likely still missed a ton of checks...
This commit is contained in:
Gunther De Wachter
2017-06-26 05:15:25 +02:00
parent 370fc49357
commit da5879b667
117 changed files with 594 additions and 570 deletions
@@ -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;
}