public <T extends Item & IToolPart> void addCombination(ToolCore toolCore, T toolPart) { toolCores.add(toolCore); ItemStack toolPartItem = toolPart.getItemstackWithMaterial(material); List<ItemStack> stacks = new ArrayList<>(); stacks.add(toolPartItem); stacks.addAll(EMBOSSMENT_ITEMS); addRecipeMatch(new RecipeMatch.ItemCombination(1, stacks.toArray(new ItemStack[stacks.size()]))); }
@Subscribe public void postInit(FMLPostInitializationEvent event) { if(TinkerTools.shard == null) { return; } // each material without a shard set gets the default one set for(Material material : TinkerRegistry.getAllMaterials()) { ItemStack shard = TinkerTools.shard.getItemstackWithMaterial(material); material.addRecipeMatch(new RecipeMatch.ItemCombination(Material.VALUE_Shard, shard)); if(material.getShard() != null) { material.setShard(shard); } } } }
public ModFortify(Material material) { super("fortify" + material.getIdentifier(), material.materialTextColor); if(!material.hasStats(MaterialTypes.HEAD)) { throw new TinkerAPIException(String.format("Trying to add a fortify-modifier for a material without tool stats: %s", material.getIdentifier())); } this.material = material; addAspects(new ModifierAspect.SingleAspect(this), new ModifierAspect.DataAspect(this), ModifierAspect.harvestOnly); ItemStack kit = TinkerTools.sharpeningKit.getItemstackWithMaterial(material); ItemStack flint = new ItemStack(Items.FLINT); addRecipeMatch(new RecipeMatch.ItemCombination(1, kit, flint)); }
public static RecipeMatch ofNBT(ItemStack stack, int matched) { return new RecipeMatch.ItemCombination(matched, stack); }
public static void register() { Material material = TinkerRegistry.getMaterial(Alloy.VIBRANT_ALLOY.getBaseName()); ItemStack itemstackWithMaterial = TinkerTools.largePlate.getItemstackWithMaterial(material); TraitPickup.instance.addRecipeMatch(new RecipeMatch.ItemCombination(1, itemstackWithMaterial)); }
modBeheading.addRecipeMatch(new RecipeMatch.ItemCombination(1, new ItemStack(Items.ENDER_PEARL), new ItemStack(Blocks.OBSIDIAN))); modBlasting.addRecipeMatch(new RecipeMatch.ItemCombination(1, tnt, tnt, tnt)); modGlowing.addRecipeMatch(new RecipeMatch.ItemCombination(1, glowstoneDust, new ItemStack(Items.ENDER_EYE), glowstoneDust));
modSpaghettiMeat.addRecipeMatch(new RecipeMatch.ItemCombination(1, new ItemStack(Items.COOKED_BEEF), new ItemStack(Items.COOKED_CHICKEN), new ItemStack(Items.COOKED_MUTTON), new ItemStack(Items.COOKED_PORKCHOP)));
/** Registers this itemstack NBT-SENSITIVE to melt into amount of the given fluid. */ public static void registerMelting(ItemStack stack, Fluid fluid, int amount) { registerMelting(new MeltingRecipe(new RecipeMatch.ItemCombination(amount, stack), fluid)); }