Prevent modification of ItemStack.EMPTY's NBT (#1502)

* Prevent modification of ItemStack.EMPTY's NBT

* Use ItemStack#isEmpty() instead of comparing to ItemStack.EMPTY
This commit is contained in:
TomyLobo 2019-12-07 07:16:03 +01:00 committed by Adubbz
parent db505903c9
commit 12efc07bab

View file

@ -45,7 +45,7 @@ public class BiomeEssenceRecipe extends net.minecraftforge.registries.IForgeRegi
}
}
if (biomeRadar != null && biomeEssence != null)
if (!biomeRadar.isEmpty() && !biomeEssence.isEmpty())
{
if (!biomeEssence.hasTagCompound() || !biomeEssence.getTagCompound().hasKey("biomeID")) return false;
@ -103,4 +103,4 @@ public class BiomeEssenceRecipe extends net.minecraftforge.registries.IForgeRegi
{
return width * height >= 1;
}
}
}