Fix facade recipes. Hopefully the last null check fix.

This commit is contained in:
Gunther De Wachter
2017-06-27 20:39:06 +02:00
parent b819fe4adb
commit 61b81fc802
52 changed files with 101 additions and 83 deletions
@@ -66,7 +66,7 @@ class FacadeRegistryPlugin implements IRecipeRegistryPlugin
// Looking up if a certain block can be used to make a facade
ItemStack itemStack = (ItemStack) focus.getValue();
if( itemFacade.createFacadeForItem( itemStack, true ) != null )
if( !itemFacade.createFacadeForItem( itemStack, true ).isEmpty() )
{
return Collections.singletonList( VanillaRecipeCategoryUid.CRAFTING );
}
@@ -102,7 +102,7 @@ class FacadeRegistryPlugin implements IRecipeRegistryPlugin
ItemStack itemStack = (ItemStack) focus.getValue();
ItemStack facade = itemFacade.createFacadeForItem( itemStack, false );
if( facade != null )
if( !facade.isEmpty() )
{
return Collections.singletonList( (T) new FacadeRecipeWrapper( itemStack, cableAnchor, facade ) );
}
@@ -46,7 +46,7 @@ public class ChargerInfoProvider implements ITileProbInfoProvider
final IInventory chargerInventory = charger.getInternalInventory();
final ItemStack chargingItem = chargerInventory.getStackInSlot( 0 );
if( chargingItem != null )
if( !chargingItem.isEmpty() )
{
final String currentInventory = chargingItem.getDisplayName();
final IProbeInfo centerAlignedHorizontalLayout = probeInfo