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
@@ -26,6 +26,7 @@ import java.util.Set;
import javax.annotation.Nullable;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
@@ -140,7 +141,7 @@ public class ItemComparisonHelper
*/
// test damageable items..
if( a.getItem() != null && b.getItem() != null && a.getItem().isDamageable() && a.getItem() == b.getItem() )
if( a.getItem() != Items.AIR && b.getItem() != Items.AIR && a.getItem().isDamageable() && a.getItem() == b.getItem() )
{
try
{
@@ -379,11 +380,11 @@ public class ItemComparisonHelper
*/
private boolean hasSameNbtTag( final ItemStack a, final ItemStack b )
{
if( a == null && b == null )
if( a.isEmpty() && b.isEmpty() )
{
return true;
}
if( a == null || b == null )
if( a.isEmpty() || b.isEmpty() )
{
return false;
}