Changed LavaCrystal getBinding behaviour, cleaned up JEI hiding

This commit is contained in:
TeamDman 2018-12-07 01:57:41 -05:00 committed by Nick Ignoffo
parent 88e72ee013
commit 002f23c53d
3 changed files with 17 additions and 14 deletions

View file

@ -57,12 +57,9 @@ public class Binding implements INBTSerializable<NBTTagCompound> {
@Nullable
public static Binding fromStack(ItemStack stack) {
// if (!stack.hasTagCompound()) // Definitely hasn't been bound yet.
// return null;
if (stack.getTagCompound() == null) // hasTagCompound doesn't work on empty stacks with tags
if (!stack.hasTagCompound()) // Definitely hasn't been bound yet.
return null;
NBTBase bindingTag = stack.getTagCompound().getTag("binding");
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.hasNoTags()) // Make sure it's both a tag compound and that it has actual data.
return null;