Even more null fixes.
This commit is contained in:
@@ -109,7 +109,7 @@ public class BlockChest extends AEBaseTileBlock
|
||||
else
|
||||
{
|
||||
final ItemStack cell = tg.getStackInSlot( 1 );
|
||||
if( cell != null )
|
||||
if( !cell.isEmpty() )
|
||||
{
|
||||
final ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class JEIPlugin extends BlankModPlugin
|
||||
|
||||
ItemStack grindstone = definitions.blocks().grindstone().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
if( grindstone == null )
|
||||
if( grindstone.isEmpty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -143,24 +143,24 @@ public class JEIPlugin extends BlankModPlugin
|
||||
{
|
||||
|
||||
ItemStack condenser = definitions.blocks().condenser().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( condenser == null )
|
||||
if( condenser.isEmpty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack matterBall = definitions.materials().matterBall().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( matterBall != null )
|
||||
if( !matterBall.isEmpty() )
|
||||
{
|
||||
registry.addRecipes( ImmutableList.of( CondenserOutput.MATTER_BALLS ) );
|
||||
}
|
||||
|
||||
ItemStack singularity = definitions.materials().singularity().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( singularity != null )
|
||||
if( !singularity.isEmpty() )
|
||||
{
|
||||
registry.addRecipes( ImmutableList.of( CondenserOutput.SINGULARITY ) );
|
||||
}
|
||||
|
||||
if( matterBall != null || singularity != null )
|
||||
if( !matterBall.isEmpty() || !singularity.isEmpty() )
|
||||
{
|
||||
registry.addRecipeCategories( new CondenserCategory( registry.getJeiHelpers().getGuiHelper() ) );
|
||||
registry.addRecipeCategoryCraftingItem( condenser, CondenserCategory.UID );
|
||||
|
||||
@@ -261,11 +261,11 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
||||
*/
|
||||
|
||||
default:
|
||||
newType = null;
|
||||
newType = ItemStack.EMPTY;
|
||||
break;
|
||||
}
|
||||
|
||||
if( newType != null && !Platform.itemComparisons().isEqualItem( newType, this.getItemStack() ) )
|
||||
if( !newType.isEmpty() && !Platform.itemComparisons().isEqualItem( newType, this.getItemStack() ) )
|
||||
{
|
||||
final boolean oldOutput = this.isOutput();
|
||||
final long myFreq = this.getFrequency();
|
||||
|
||||
@@ -108,7 +108,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
private final AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 );
|
||||
private final BaseActionSource mySrc = new MachineSource( this );
|
||||
private final IConfigManager config = new ConfigManager( this );
|
||||
private ItemStack storageType;
|
||||
private ItemStack storageType = ItemStack.EMPTY;
|
||||
private long lastStateChange = 0;
|
||||
private int priority = 0;
|
||||
private int state = 0;
|
||||
|
||||
@@ -242,7 +242,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
{
|
||||
for( int x = 0; x < 6; x++ )
|
||||
{
|
||||
if( this.cells.getStackInSlot( x ) != null )
|
||||
if( !this.cells.getStackInSlot( x ).isEmpty() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -572,7 +572,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
{
|
||||
final ItemStack stackInSlot = this.upgrades.getStackInSlot( upgradeIndex );
|
||||
|
||||
if( stackInSlot != null )
|
||||
if( !stackInSlot.isEmpty() )
|
||||
{
|
||||
drops.add( stackInSlot );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user