diff --git a/src/main/java/appeng/container/implementations/ContainerNetworkStatus.java b/src/main/java/appeng/container/implementations/ContainerNetworkStatus.java index d132d581..983d7ab0 100644 --- a/src/main/java/appeng/container/implementations/ContainerNetworkStatus.java +++ b/src/main/java/appeng/container/implementations/ContainerNetworkStatus.java @@ -119,7 +119,7 @@ public class ContainerNetworkStatus extends AEBaseContainer { final IGridBlock blk = machine.getGridBlock(); final ItemStack is = blk.getMachineRepresentation(); - if( !is.isEmpty() && is.getItem() != Items.AIR ) + if( !is.isEmpty() ) { final IAEItemStack ais = AEItemStack.create( is ); ais.setStackSize( 1 ); diff --git a/src/main/java/appeng/container/slot/SlotPatternTerm.java b/src/main/java/appeng/container/slot/SlotPatternTerm.java index 6f6e0944..4d644d90 100644 --- a/src/main/java/appeng/container/slot/SlotPatternTerm.java +++ b/src/main/java/appeng/container/slot/SlotPatternTerm.java @@ -58,7 +58,7 @@ public class SlotPatternTerm extends SlotCraftingTerm { if( !this.isEnabled() ) { - if( this.getDisplayStack() != null ) + if( !this.getDisplayStack().isEmpty() ) { this.clearStack(); } diff --git a/src/main/java/appeng/decorative/solid/BlockSkyStone.java b/src/main/java/appeng/decorative/solid/BlockSkyStone.java index bdae096e..67f51124 100644 --- a/src/main/java/appeng/decorative/solid/BlockSkyStone.java +++ b/src/main/java/appeng/decorative/solid/BlockSkyStone.java @@ -65,7 +65,7 @@ public class BlockSkyStone extends AEBaseBlock final ItemStack is = event.getEntityPlayer().getItemStackFromSlot( EntityEquipmentSlot.MAINHAND ); int level = -1; - if( !is.isEmpty() && is.getItem() != Items.AIR ) + if( !is.isEmpty() ) { level = is.getItem().getHarvestLevel( is, "pickaxe", event.getEntityPlayer(), event.getState() ); } diff --git a/src/main/java/appeng/entity/EntityChargedQuartz.java b/src/main/java/appeng/entity/EntityChargedQuartz.java index a02e9763..f1292100 100644 --- a/src/main/java/appeng/entity/EntityChargedQuartz.java +++ b/src/main/java/appeng/entity/EntityChargedQuartz.java @@ -119,7 +119,7 @@ public final class EntityChargedQuartz extends AEBaseEntityItem if( e instanceof EntityItem && !e.isDead ) { final ItemStack other = ( (EntityItem) e ).getEntityItem(); - if( !other.isEmpty() && other.getCount() > 0 ) + if( !other.isEmpty() ) { if( Platform.itemComparisons().isEqualItem( other, new ItemStack( Items.REDSTONE ) ) ) { diff --git a/src/main/java/appeng/items/materials/ItemMaterial.java b/src/main/java/appeng/items/materials/ItemMaterial.java index be87de16..0ab9ca51 100644 --- a/src/main/java/appeng/items/materials/ItemMaterial.java +++ b/src/main/java/appeng/items/materials/ItemMaterial.java @@ -221,7 +221,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent, { for( final ItemStack is : options ) { - if( !is.isEmpty() && is.getItem() != Items.AIR ) + if( !is.isEmpty() ) { replacement = is.copy(); break; diff --git a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java index 94f3b1ca..3d76abe4 100644 --- a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java @@ -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_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 output = new AppEngInternalInventory( this, 3 ); diff --git a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java index a3b0b107..eda954be 100644 --- a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java +++ b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java @@ -52,7 +52,7 @@ public class AppEngInternalInventory implements IInventory, Iterable { for( int x = 0; x < this.size; x++ ) { - if( this.getStackInSlot( x ) != null ) + if( !this.getStackInSlot( x ).isEmpty() ) { return false; } @@ -117,7 +117,7 @@ public class AppEngInternalInventory implements IInventory, Iterable if( this.inv[slot] == null ) return ItemStack.EMPTY; - else return this.inv[slot]; + return this.inv[slot]; } @Override