From 66a797dd7c7c9098979b3c012141ffa50d64f77b Mon Sep 17 00:00:00 2001 From: Gunther De Wachter Date: Tue, 27 Jun 2017 17:20:13 +0200 Subject: [PATCH] Fixed grindstone not working with crank due to missed null checks. --- src/main/java/appeng/tile/grindstone/TileGrinder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/appeng/tile/grindstone/TileGrinder.java b/src/main/java/appeng/tile/grindstone/TileGrinder.java index 7d711c4a0..6c8c8cdfe 100644 --- a/src/main/java/appeng/tile/grindstone/TileGrinder.java +++ b/src/main/java/appeng/tile/grindstone/TileGrinder.java @@ -97,13 +97,13 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable return false; } - if( null == this.getStackInSlot( 6 ) ) // Add if there isn't one... + if( this.getStackInSlot( 6 ).isEmpty() ) // Add if there isn't one... { final IInventory src = new WrapperInventoryRange( this, this.inputs, true ); for( int x = 0; x < src.getSizeInventory(); x++ ) { ItemStack item = src.getStackInSlot( x ); - if( item == null ) + if( item.isEmpty() ) { continue; } @@ -119,7 +119,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable if( item.getCount() <= 0 ) { - item = null; + item = ItemStack.EMPTY; } src.setInventorySlotContents( x, item ); @@ -183,7 +183,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable private void addItem( final InventoryAdaptor sia, final ItemStack output ) { - if( output == null ) + if( output.isEmpty() ) { return; }