Fix facade recipes. Hopefully the last null check fix.
This commit is contained in:
@@ -31,6 +31,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
@@ -68,14 +69,14 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
}
|
||||
|
||||
final Item item = is.getItem();
|
||||
if( item == null )
|
||||
if( item == Items.AIR )
|
||||
{
|
||||
throw new InvalidParameterException( "Contained item is null, thus not a valid ItemStack for AEItemStack." );
|
||||
}
|
||||
|
||||
this.setDefinition( new AEItemDef( item ) );
|
||||
|
||||
if( this.getDefinition().getItem() == null )
|
||||
if( this.getDefinition().getItem() == Items.AIR )
|
||||
{
|
||||
throw new InvalidParameterException( "This ItemStack is bad, it has a null item." );
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.util.item;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -81,7 +82,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
|
||||
final Item item = s.getItem();
|
||||
int meta = -1;
|
||||
if( s.getItem() != null && s.isItemStackDamageable() && s.getHasSubtypes() )
|
||||
if( s.getItem() != Items.AIR && s.isItemStackDamageable() && s.getHasSubtypes() )
|
||||
{
|
||||
meta = s.getItemDamage();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -54,7 +55,7 @@ public class OreReference
|
||||
{
|
||||
for( final ItemStack is : OreHelper.INSTANCE.getCachedOres( oreName ) )
|
||||
{
|
||||
if( is.getItem() != null )
|
||||
if( is.getItem() != Items.AIR )
|
||||
{
|
||||
this.aeOtherOptions.add( AEItemStack.create( is ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user