More null's and cosmetic fixes.

This commit is contained in:
Gunther De Wachter
2017-06-30 17:30:03 +02:00
parent c382ab7300
commit 49a87f62ce
7 changed files with 8 additions and 8 deletions
@@ -119,7 +119,7 @@ public class ContainerNetworkStatus extends AEBaseContainer
{ {
final IGridBlock blk = machine.getGridBlock(); final IGridBlock blk = machine.getGridBlock();
final ItemStack is = blk.getMachineRepresentation(); final ItemStack is = blk.getMachineRepresentation();
if( !is.isEmpty() && is.getItem() != Items.AIR ) if( !is.isEmpty() )
{ {
final IAEItemStack ais = AEItemStack.create( is ); final IAEItemStack ais = AEItemStack.create( is );
ais.setStackSize( 1 ); ais.setStackSize( 1 );
@@ -58,7 +58,7 @@ public class SlotPatternTerm extends SlotCraftingTerm
{ {
if( !this.isEnabled() ) if( !this.isEnabled() )
{ {
if( this.getDisplayStack() != null ) if( !this.getDisplayStack().isEmpty() )
{ {
this.clearStack(); this.clearStack();
} }
@@ -65,7 +65,7 @@ public class BlockSkyStone extends AEBaseBlock
final ItemStack is = event.getEntityPlayer().getItemStackFromSlot( EntityEquipmentSlot.MAINHAND ); final ItemStack is = event.getEntityPlayer().getItemStackFromSlot( EntityEquipmentSlot.MAINHAND );
int level = -1; int level = -1;
if( !is.isEmpty() && is.getItem() != Items.AIR ) if( !is.isEmpty() )
{ {
level = is.getItem().getHarvestLevel( is, "pickaxe", event.getEntityPlayer(), event.getState() ); level = is.getItem().getHarvestLevel( is, "pickaxe", event.getEntityPlayer(), event.getState() );
} }
@@ -119,7 +119,7 @@ public final class EntityChargedQuartz extends AEBaseEntityItem
if( e instanceof EntityItem && !e.isDead ) if( e instanceof EntityItem && !e.isDead )
{ {
final ItemStack other = ( (EntityItem) e ).getEntityItem(); final ItemStack other = ( (EntityItem) e ).getEntityItem();
if( !other.isEmpty() && other.getCount() > 0 ) if( !other.isEmpty() )
{ {
if( Platform.itemComparisons().isEqualItem( other, new ItemStack( Items.REDSTONE ) ) ) if( Platform.itemComparisons().isEqualItem( other, new ItemStack( Items.REDSTONE ) ) )
{ {
@@ -221,7 +221,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
{ {
for( final ItemStack is : options ) for( final ItemStack is : options )
{ {
if( !is.isEmpty() && is.getItem() != Items.AIR ) if( !is.isEmpty() )
{ {
replacement = is.copy(); replacement = is.copy();
break; break;
@@ -50,7 +50,7 @@ public class PartPatternTerminal extends AbstractPartTerminal
public static final IPartModel MODELS_OFF = new PartModel( MODEL_BASE, MODEL_OFF, MODEL_STATUS_OFF ); public static final IPartModel MODELS_OFF = new PartModel( MODEL_BASE, MODEL_OFF, MODEL_STATUS_OFF );
public static final IPartModel MODELS_ON = new PartModel( MODEL_BASE, MODEL_ON, MODEL_STATUS_ON ) ; public static final IPartModel MODELS_ON = new PartModel( MODEL_BASE, MODEL_ON, MODEL_STATUS_ON ) ;
public static final IPartModel MODELS_HAS_CHANNEL =new PartModel( MODEL_BASE, MODEL_ON, MODEL_STATUS_HAS_CHANNEL ) ; public static final IPartModel MODELS_HAS_CHANNEL = new PartModel( MODEL_BASE, MODEL_ON, MODEL_STATUS_HAS_CHANNEL ) ;
private final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 ); private final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 );
private final AppEngInternalInventory output = new AppEngInternalInventory( this, 3 ); private final AppEngInternalInventory output = new AppEngInternalInventory( this, 3 );
@@ -52,7 +52,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
{ {
for( int x = 0; x < this.size; x++ ) for( int x = 0; x < this.size; x++ )
{ {
if( this.getStackInSlot( x ) != null ) if( !this.getStackInSlot( x ).isEmpty() )
{ {
return false; return false;
} }
@@ -117,7 +117,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
if( this.inv[slot] == null ) if( this.inv[slot] == null )
return ItemStack.EMPTY; return ItemStack.EMPTY;
else return this.inv[slot]; return this.inv[slot];
} }
@Override @Override