diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java b/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java index d615e21d..dce7a1c2 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java @@ -91,15 +91,10 @@ public class BloodMagicJEIPlugin implements IModPlugin { registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER), Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE); if (!ConfigHandler.general.enableTierSixEvenThoughThereIsNoContent) { - for (ItemStack stack : new ItemStack[]{ -// OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_TRANSCENDENT), //unregistered elsewhere - new ItemStack(RegistrarBloodMagicBlocks.DECORATIVE_BRICK, 1, EnumDecorative.CRYSTAL_TILE.ordinal()), - new ItemStack(RegistrarBloodMagicBlocks.DECORATIVE_BRICK, 1, EnumDecorative.CRYSTAL_BRICK.ordinal()), - new ItemStack(RegistrarBloodMagicItems.INSCRIPTION_TOOL, 1, EnumRuneType.DAWN.ordinal()) - }) { - jeiHelper.getIngredientBlacklist().addIngredientToBlacklist(stack); - } - } + jeiHelper.getIngredientBlacklist().addIngredientToBlacklist(new ItemStack(RegistrarBloodMagicBlocks.DECORATIVE_BRICK, 1, EnumDecorative.CRYSTAL_TILE.ordinal())); + jeiHelper.getIngredientBlacklist().addIngredientToBlacklist(new ItemStack(RegistrarBloodMagicBlocks.DECORATIVE_BRICK, 1, EnumDecorative.CRYSTAL_BRICK.ordinal())); + jeiHelper.getIngredientBlacklist().addIngredientToBlacklist(new ItemStack(RegistrarBloodMagicItems.INSCRIPTION_TOOL, 1, EnumRuneType.DAWN.ordinal())); + } } @Override diff --git a/src/main/java/WayofTime/bloodmagic/core/data/Binding.java b/src/main/java/WayofTime/bloodmagic/core/data/Binding.java index f288d6ae..3d7b8e2a 100644 --- a/src/main/java/WayofTime/bloodmagic/core/data/Binding.java +++ b/src/main/java/WayofTime/bloodmagic/core/data/Binding.java @@ -57,12 +57,9 @@ public class Binding implements INBTSerializable { @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; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java index ed4153a0..1b47e612 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java @@ -10,6 +10,9 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.MobEffects; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTUtil; import net.minecraft.potion.PotionEffect; import javax.annotation.Nonnull; @@ -59,7 +62,15 @@ public class ItemLavaCrystal extends ItemBindableBase implements IVariantProvide @Nullable @Override public Binding getBinding(ItemStack stack) { - return Binding.fromStack(stack); + if (stack.getTagCompound() == null) // hasTagCompound doesn't work on empty stacks with tags + 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; + + NBTTagCompound nbt = (NBTTagCompound) bindingTag; + return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id")),nbt.getString("name")); } @Override