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
@@ -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 );
}