diff --git a/src/main/java/org/squiddev/cctweaks/core/pocket/CraftingPocketUpgrade.java b/src/main/java/org/squiddev/cctweaks/core/pocket/CraftingPocketUpgrade.java index 6e9e7548..587b8cf2 100644 --- a/src/main/java/org/squiddev/cctweaks/core/pocket/CraftingPocketUpgrade.java +++ b/src/main/java/org/squiddev/cctweaks/core/pocket/CraftingPocketUpgrade.java @@ -92,13 +92,4 @@ public void init() { RecipeSorter.register(CCTweaks.RESOURCE_DOMAIN + ":pocket_upgrade_crafting", CraftingPocketUpgrade.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); GameRegistry.addRecipe(this); } - - public static ItemStack setNBT(ItemStack stack, IPocketUpgrade upgrade) { - NBTTagCompound tag = stack.getTagCompound(); - if (tag == null) stack.setTagCompound(tag = new NBTTagCompound()); - - tag.setShort("upgrade", PocketRegistry.FLAG); - tag.setString("upgrade_name", upgrade.getUpgradeID().toString()); - return stack; - } } diff --git a/src/main/java/org/squiddev/cctweaks/integration/jei/PocketUpgradeWrapper.java b/src/main/java/org/squiddev/cctweaks/integration/jei/PocketUpgradeWrapper.java index 1be25094..809a4540 100644 --- a/src/main/java/org/squiddev/cctweaks/integration/jei/PocketUpgradeWrapper.java +++ b/src/main/java/org/squiddev/cctweaks/integration/jei/PocketUpgradeWrapper.java @@ -5,7 +5,7 @@ import mezz.jei.api.recipe.BlankRecipeWrapper; import net.minecraft.item.ItemStack; import org.squiddev.cctweaks.api.pocket.IPocketUpgrade; -import org.squiddev.cctweaks.core.pocket.CraftingPocketUpgrade; +import org.squiddev.cctweaks.core.pocket.PocketRegistry; import javax.annotation.Nonnull; import java.util.Arrays; @@ -30,7 +30,7 @@ public PocketUpgradeWrapper(ItemStack inputStack, ItemStack upgradeStack, ItemSt public PocketUpgradeWrapper(IPocketUpgrade upgrade, ComputerFamily family) { inputStack = PocketComputerItemFactory.create(-1, null, family, false); upgradeStack = upgrade.getCraftingItem(); - outputStack = CraftingPocketUpgrade.setNBT(inputStack.copy(), upgrade); + PocketRegistry.instance.setToItemStack(outputStack = inputStack.copy(), upgrade); } @Override