Deleted redundant null checks

This commit is contained in:
Andrew
2014-09-28 10:41:51 -07:00
parent f9b9729fb5
commit 0042176f29
18 changed files with 32 additions and 46 deletions
@@ -247,7 +247,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
if ( sbp != null )
{
IGridNode sn = sbp.getGridNode();
if ( sn != null && cn != null )
if ( sn != null )
{
try
{
@@ -574,8 +574,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
data.writeShort( Item.getIdFromItem( is.getItem() ) );
data.writeShort( is.getItemDamage() );
if ( p != null )
p.writeToStream( data );
p.writeToStream( data );
}
}
@@ -921,7 +920,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
}
}
if ( facades != null && !facades.isEmpty() )
if ( !facades.isEmpty() )
{
TileEntity te = tcb.getTile();
Platform.spawnDrops( te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, facades );
@@ -162,7 +162,7 @@ public class PartPlacement
if ( host.isEmpty() )
host.cleanup();
if ( is != null && !is.isEmpty() )
if ( !is.isEmpty() )
{
Platform.spawnDrops( world, x, y, z, is );
}
@@ -254,7 +254,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
if ( !ignore )
{
if ( !w.isAirBlock( x, y, z ) && w.blockExists( x, y, z ) && blk != null && w.canMineBlock( Platform.getPlayer( w ), x, y, z ) )
if ( !w.isAirBlock( x, y, z ) && w.blockExists( x, y, z ) && w.canMineBlock( Platform.getPlayer( w ), x, y, z ) )
{
float hardness = blk.getBlockHardness( w, x, y, z );
if ( hardness >= 0.0 )
@@ -59,8 +59,6 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
if ( inventories.isEmpty() || slotCount == 0 )
{
inventories = null;
sideData = null;
slots = null;
}
else
{