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
+1 -1
View File
@@ -84,7 +84,7 @@ public class ItemRepo
if( idx >= this.dsp.size() )
{
return null;
return ItemStack.EMPTY;
}
return this.dsp.get( idx );
}
@@ -63,11 +63,11 @@ public class SlotDisconnected extends AppEngSlot
if( Platform.isClient() )
{
final ItemStack is = super.getStack();
if( is != null && is.getItem() instanceof ItemEncodedPattern )
if( !is.isEmpty() && is.getItem() instanceof ItemEncodedPattern )
{
final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
final ItemStack out = iep.getOutput( is );
if( out != null )
if( !out.isEmpty() )
{
return out;
}
+3 -3
View File
@@ -60,7 +60,7 @@ public class SlotME extends Slot
{
return this.mySlot.getStack();
}
return null;
return ItemStack.EMPTY;
}
@Override
@@ -68,7 +68,7 @@ public class SlotME extends Slot
{
if( this.mySlot.hasPower() )
{
return this.getStack() != null;
return !this.getStack().isEmpty();
}
return false;
}
@@ -88,7 +88,7 @@ public class SlotME extends Slot
@Override
public ItemStack decrStackSize( final int par1 )
{
return null;
return ItemStack.EMPTY;
}
@Override