Java Code Examples for thaumcraft.api.ThaumcraftApiHelper#areItemStackTagsEqualForCrafting()
The following examples show how to use
thaumcraft.api.ThaumcraftApiHelper#areItemStackTagsEqualForCrafting() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InfusionRecipe.java From GardenCollection with MIT License | 6 votes |
public static boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; //nbt boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } //damage boolean damage = stack0.getItemDamage() == stack1.getItemDamage() || stack1.getItemDamage() == OreDictionary.WILDCARD_VALUE; return stack0.getItem() != stack1.getItem() ? false : (!damage ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 2
Source File: InfusionEnchantmentRecipe.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 3
Source File: InfusionRecipe.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
public static boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; //nbt boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } //damage boolean damage = stack0.getItemDamage() == stack1.getItemDamage() || stack1.getItemDamage() == OreDictionary.WILDCARD_VALUE; return stack0.getItem() != stack1.getItem() ? false : (!damage ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 4
Source File: InfusionEnchantmentRecipe.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { int od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 5
Source File: InfusionRecipe.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 6 votes |
public static boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; //nbt boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { int od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } //damage boolean damage = stack0.getItemDamage() == stack1.getItemDamage() || stack1.getItemDamage() == OreDictionary.WILDCARD_VALUE; return stack0.getItem() != stack1.getItem() ? false : (!damage ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 6
Source File: InfusionEnchantmentRecipe.java From GardenCollection with MIT License | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 7
Source File: InfusionEnchantmentRecipe.java From Chisel-2 with GNU General Public License v2.0 | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 8
Source File: InfusionRecipe.java From Chisel-2 with GNU General Public License v2.0 | 6 votes |
public static boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; //nbt boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { Integer od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } //damage boolean damage = stack0.getItemDamage() == stack1.getItemDamage() || stack1.getItemDamage() == OreDictionary.WILDCARD_VALUE; return stack0.getItem() != stack1.getItem() ? false : (!damage ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 9
Source File: InfusionEnchantmentRecipe.java From AdvancedMod with GNU General Public License v3.0 | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { int od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 10
Source File: InfusionRecipe.java From AdvancedMod with GNU General Public License v3.0 | 6 votes |
protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) { if (stack0==null && stack1!=null) return false; if (stack0!=null && stack1==null) return false; if (stack0==null && stack1==null) return true; boolean t1=ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(stack0, stack1); if (!t1) return false; if (fuzzy) { int od = OreDictionary.getOreID(stack0); if (od!=-1) { ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } } return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : stack0.stackSize <= stack0.getMaxStackSize() ); }
Example 11
Source File: ShapelessArcaneRecipe.java From GardenCollection with MIT License | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 12
Source File: ShapedArcaneRecipe.java From GardenCollection with MIT License | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 13
Source File: ShapelessArcaneRecipe.java From AdvancedMod with GNU General Public License v3.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 14
Source File: ShapedArcaneRecipe.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 15
Source File: ShapelessArcaneRecipe.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 16
Source File: ShapedArcaneRecipe.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 17
Source File: ShapelessArcaneRecipe.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 18
Source File: ShapelessArcaneRecipe.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 19
Source File: ShapedArcaneRecipe.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }
Example 20
Source File: ShapedArcaneRecipe.java From AdvancedMod with GNU General Public License v3.0 | 5 votes |
private boolean checkItemEquals(ItemStack target, ItemStack input) { if (input == null && target != null || input != null && target == null) { return false; } return (target.getItem() == input.getItem() && (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); }