Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

Commit

Permalink
Merge branch 'minecraft-1.10.2' into minecraft-1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Mar 2, 2017
2 parents 9ad0480 + ab67593 commit 19649f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,4 @@ public void init() {
RecipeSorter.register(CCTweaks.ID + ":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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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;
Expand All @@ -29,7 +29,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
Expand Down

0 comments on commit 19649f9

Please sign in to comment.