Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GeomancyRecipe extends ShapelessOreRecipe {
- //public ItemStack result;
- public String tag;
- public GeomancyRecipe(Block result, String tag, Object... recipe) {
- super(result, recipe);
- this.tag = tag;
- }
- public GeomancyRecipe(Item result, String tag, Object... recipe) {
- super(result, recipe);
- this.tag = tag;
- }
- public GeomancyRecipe(ItemStack result, String tag, Object... recipe) {
- super(result, recipe);
- this.tag = tag;
- }
- @Override
- public ItemStack getCraftingResult(InventoryCrafting inventory) {
- ItemStack result = null;
- for (int i = 0; i < inventory.getSizeInventory(); ++i) {
- ItemStack stack = inventory.getStackInSlot(i);
- if (stack != null && stack.getItem() == ItemRegistry.talisman) {
- result = stack.copy();
- result.stackSize = 1;
- break;
- }
- }
- //result.stackTagCompound = new NBTTagCompound();
- if (!result.hasTagCompound()) {
- result.stackTagCompound = new NBTTagCompound();
- }
- if (!result.stackTagCompound.hasKey(tag)) {
- result.stackTagCompound.setString(tag, tag);
- }
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement