Fix facade recipes. Hopefully the last null check fix.
This commit is contained in:
@@ -20,6 +20,7 @@ package appeng.core.api.imc;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
@@ -39,7 +40,7 @@ public class IMCBlackListSpatial implements IIMCProcessor
|
||||
if( !is.isEmpty() )
|
||||
{
|
||||
final Block blk = Block.getBlockFromItem( is.getItem() );
|
||||
if( blk != null )
|
||||
if( blk != Blocks.AIR )
|
||||
{
|
||||
AEApi.instance().registries().movable().blacklistBlock( blk );
|
||||
return;
|
||||
|
||||
@@ -75,12 +75,12 @@ public class IMCGrinder implements IIMCProcessor
|
||||
|
||||
final int turns = msg.getInteger( "turns" );
|
||||
|
||||
if( in == null )
|
||||
if( in.isEmpty() )
|
||||
{
|
||||
throw new IllegalStateException( "invalid input" );
|
||||
}
|
||||
|
||||
if( out == null )
|
||||
if( out.isEmpty() )
|
||||
{
|
||||
throw new IllegalStateException( "invalid output" );
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class IMCGrinder implements IIMCProcessor
|
||||
final NBTTagCompound optionalTag = (NBTTagCompound) msg.getTag( "optional" );
|
||||
final ItemStack optional = new ItemStack( optionalTag );
|
||||
|
||||
if( optional == null )
|
||||
if( optional.isEmpty() )
|
||||
{
|
||||
throw new IllegalStateException( "invalid optional" );
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class IMCMatterCannon implements IIMCProcessor
|
||||
final ItemStack ammo = new ItemStack( item );
|
||||
final double weight = msg.getDouble( "weight" );
|
||||
|
||||
if( ammo == null )
|
||||
if( ammo.isEmpty() )
|
||||
{
|
||||
throw new IllegalStateException( "invalid item in message " + m );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user