Fix facade recipes. Hopefully the last null check fix.
This commit is contained in:
@@ -37,6 +37,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -220,7 +221,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
|
||||
{
|
||||
for( final ItemStack is : options )
|
||||
{
|
||||
if( !is.isEmpty() && is.getItem() != null )
|
||||
if( !is.isEmpty() && is.getItem() != Items.AIR )
|
||||
{
|
||||
replacement = is.copy();
|
||||
break;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
try
|
||||
{
|
||||
final ItemStack in = this.getTextureItem( is );
|
||||
if( in != null )
|
||||
if( !in.isEmpty() )
|
||||
{
|
||||
return super.getItemStackDisplayName( is ) + " - " + in.getDisplayName();
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
try
|
||||
{
|
||||
final Item item = Item.getItemFromBlock( b );
|
||||
if( item == null )
|
||||
if( item == Items.AIR )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
for( final ItemStack l : tmpList )
|
||||
{
|
||||
final ItemStack facade = this.createFacadeForItem( l, false );
|
||||
if( facade != null )
|
||||
if( !facade.isEmpty() )
|
||||
{
|
||||
this.subTypes.add( facade );
|
||||
}
|
||||
@@ -153,13 +153,13 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
|
||||
public ItemStack createFacadeForItem( final ItemStack l, final boolean returnItem )
|
||||
{
|
||||
if( l == null )
|
||||
if( l.isEmpty() )
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
final Block b = Block.getBlockFromItem( l.getItem() );
|
||||
if( b == null || l.hasTagCompound() )
|
||||
if( b == Blocks.AIR || l.hasTagCompound() )
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
public FacadePart createPartFromItemStack( final ItemStack is, final AEPartLocation side )
|
||||
{
|
||||
final ItemStack in = this.getTextureItem( is );
|
||||
if( in != null )
|
||||
if( !in.isEmpty() )
|
||||
{
|
||||
return new FacadePart( is, side );
|
||||
}
|
||||
@@ -265,14 +265,14 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
|
||||
ItemStack baseItemStack = getTextureItem( is );
|
||||
|
||||
if( baseItemStack == null )
|
||||
if( baseItemStack.isEmpty() )
|
||||
{
|
||||
return Blocks.GLASS.getDefaultState();
|
||||
}
|
||||
|
||||
Block block = Block.getBlockFromItem( baseItemStack.getItem() );
|
||||
|
||||
if( block == null )
|
||||
if( block == Blocks.AIR )
|
||||
{
|
||||
return Blocks.GLASS.getDefaultState();
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
{
|
||||
final NBTTagCompound color = c.getCompoundTag( "color" );
|
||||
final ItemStack oldColor = new ItemStack( color );
|
||||
if( oldColor != null )
|
||||
if( !oldColor.isEmpty() )
|
||||
{
|
||||
return oldColor;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
{
|
||||
final ItemStack result = FurnaceRecipes.instance().getSmeltingResult( i );
|
||||
|
||||
if( result != null )
|
||||
if( !result.isEmpty() )
|
||||
{
|
||||
if( result.getItem() instanceof ItemBlock )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user