First batch of null -> isEmpty() checks.
I most likely still missed a ton of checks...
This commit is contained in:
@@ -65,17 +65,17 @@ class FacadeRecipeWrapper extends BlankRecipeWrapper implements IShapedCraftingR
|
||||
{
|
||||
List<ItemStack> input = new ArrayList<>( 9 );
|
||||
|
||||
input.add( null );
|
||||
input.add( ItemStack.EMPTY );
|
||||
input.add( cableAnchor );
|
||||
input.add( null );
|
||||
input.add( ItemStack.EMPTY );
|
||||
|
||||
input.add( cableAnchor );
|
||||
input.add( textureItem );
|
||||
input.add( cableAnchor );
|
||||
|
||||
input.add( null );
|
||||
input.add( ItemStack.EMPTY );
|
||||
input.add( cableAnchor );
|
||||
input.add( null );
|
||||
input.add( ItemStack.EMPTY );
|
||||
|
||||
ingredients.setInputs( ItemStack.class, input );
|
||||
ingredients.setOutput( ItemStack.class, facade );
|
||||
|
||||
@@ -45,9 +45,9 @@ class InscriberRecipeWrapper extends BlankRecipeWrapper
|
||||
public void getIngredients( IIngredients ingredients )
|
||||
{
|
||||
List<List<ItemStack>> inputSlots = new ArrayList<>( 3 );
|
||||
inputSlots.add( Collections.singletonList( recipe.getTopOptional().orElse( null ) ) );
|
||||
inputSlots.add( Collections.singletonList( recipe.getTopOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
inputSlots.add( recipe.getInputs() );
|
||||
inputSlots.add( Collections.singletonList( recipe.getBottomOptional().orElse( null ) ) );
|
||||
inputSlots.add( Collections.singletonList( recipe.getBottomOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
ingredients.setInputLists( ItemStack.class, inputSlots );
|
||||
|
||||
ingredients.setOutput( ItemStack.class, recipe.getOutput() );
|
||||
|
||||
@@ -126,7 +126,7 @@ public class JEIPlugin extends BlankModPlugin
|
||||
private void registerGrinderRecipes( IDefinitions definitions, IModRegistry registry )
|
||||
{
|
||||
|
||||
ItemStack grindstone = definitions.blocks().grindstone().maybeStack( 1 ).orElse( null );
|
||||
ItemStack grindstone = definitions.blocks().grindstone().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
if( grindstone == null )
|
||||
{
|
||||
@@ -142,19 +142,19 @@ public class JEIPlugin extends BlankModPlugin
|
||||
private void registerCondenserRecipes( IDefinitions definitions, IModRegistry registry )
|
||||
{
|
||||
|
||||
ItemStack condenser = definitions.blocks().condenser().maybeStack( 1 ).orElse( null );
|
||||
ItemStack condenser = definitions.blocks().condenser().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( condenser == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack matterBall = definitions.materials().matterBall().maybeStack( 1 ).orElse( null );
|
||||
ItemStack matterBall = definitions.materials().matterBall().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( matterBall != null )
|
||||
{
|
||||
registry.addRecipes( ImmutableList.of( CondenserOutput.MATTER_BALLS ) );
|
||||
}
|
||||
|
||||
ItemStack singularity = definitions.materials().singularity().maybeStack( 1 ).orElse( null );
|
||||
ItemStack singularity = definitions.materials().singularity().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
if( singularity != null )
|
||||
{
|
||||
registry.addRecipes( ImmutableList.of( CondenserOutput.SINGULARITY ) );
|
||||
|
||||
Reference in New Issue
Block a user