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
@@ -107,23 +107,23 @@ public class GuiCraftAmount extends AEBaseGui
if( target instanceof PartTerminal )
{
myIcon = parts.terminal().maybeStack( 1 ).orElse( null );
myIcon = parts.terminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
this.originalGui = GuiBridge.GUI_ME;
}
if( target instanceof PartCraftingTerminal )
{
myIcon = parts.craftingTerminal().maybeStack( 1 ).orElse( null );
myIcon = parts.craftingTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
this.originalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
}
if( target instanceof PartPatternTerminal )
{
myIcon = parts.patternTerminal().maybeStack( 1 ).orElse( null );
myIcon = parts.patternTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
this.originalGui = GuiBridge.GUI_PATTERN_TERMINAL;
}
if( this.originalGui != null && myIcon != null )
if( this.originalGui != null && !myIcon.isEmpty() )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
}