/** * Associates an item entry with this material. Used for repairing and other. * * @param item The item * @param amountNeeded How many of this item are needed to count as one full material item. * @param amountMatched If both item and amount are present, how often did they match? */ public void addItem(ItemStack item, int amountNeeded, int amountMatched) { items.add(new RecipeMatch.Item(item, amountNeeded, amountMatched)); }
public static RecipeMatch of(ItemStack stack, int amount, int matched) { return new RecipeMatch.Item(stack.copy(), amount, matched); }
public static RecipeMatch of(Block block, int amount, int matched) { return new RecipeMatch.Item(new ItemStack(block), amount, matched); }
public static RecipeMatch of(net.minecraft.item.Item item, int amount, int matched) { return new RecipeMatch.Item(new ItemStack(item), amount, matched); }
/** * Associates a block with this material. Used for repairing and other. * * @param amountMatched For how many matches the block counts (e.g. redstone dust = 1 match, Redstone block = 9) */ public void addItem(Block block, int amountMatched) { items.add(new RecipeMatch.Item(new ItemStack(block), 1, amountMatched)); }
/** * Associates an item entry with this material. Used for repairing and other. * * @param item The item * @param amountNeeded How many of this item are needed to count as one full material item. * @param amountMatched If both item and amount are present, how often did they match? */ public void addItem(Item item, int amountNeeded, int amountMatched) { items.add(new RecipeMatch.Item(new ItemStack(item), amountNeeded, amountMatched)); }
RecipeMatch rm = new RecipeMatch.Item(stack, 1, Material.VALUE_Ingot); TinkerRegistry.registerMelting(MeltingRecipe.forAmount(rm, TinkerFluids.dirt, Material.VALUE_BrickBlock)); TinkerRegistry.registerTableCasting(TinkerCommons.mudBrick, castIngot, TinkerFluids.dirt, Material.VALUE_Ingot);
@Subscribe public void postInit(FMLPostInitializationEvent event) { registerSmelteryFuel(); registerMeltingCasting(); // register remaining cast creation for(FluidStack fs : castCreationFluids) { TinkerRegistry.registerTableCasting(new ItemStack(cast), ItemStack.EMPTY, fs.getFluid(), fs.amount); TinkerRegistry.registerTableCasting(new CastingRecipe(castGem, RecipeMatch.of("gemEmerald"), fs, true, true)); TinkerRegistry.registerTableCasting(new CastingRecipe(castIngot, RecipeMatch.of("ingotBrick"), fs, true, true)); TinkerRegistry.registerTableCasting(new CastingRecipe(castIngot, RecipeMatch.of("ingotBrickNether"), fs, true, true)); TinkerRegistry.registerTableCasting(new CastingRecipe(castIngot, new RecipeMatch.Item(TinkerCommons.searedBrick, 1), fs, true, true)); } proxy.postInit(); TinkerRegistry.tabSmeltery.setDisplayIcon(new ItemStack(searedTank)); }
/** * Adds a new drying recipe * * @param input Input Item * @param output Output ItemStack * @param time Recipe time in ticks */ public static void registerDryingRecipe(Item input, ItemStack output, int time) { if(output.isEmpty() || input == null) { return; } ItemStack stack = new ItemStack(input, 1, OreDictionary.WILDCARD_VALUE); addDryingRecipe(new DryingRecipe(new RecipeMatch.Item(stack, 1), output, time)); }
/** * Adds a new drying recipe * * @param input Input ItemStack * @param output Output ItemStack * @param time Recipe time in ticks */ public static void registerDryingRecipe(ItemStack input, ItemStack output, int time) { if(output.isEmpty() || input.isEmpty()) { return; } addDryingRecipe(new DryingRecipe(new RecipeMatch.Item(input, 1), output, time)); }
/** * Adds a new drying recipe * * @param input Input Block * @param output Output Block * @param time Recipe time in ticks */ public static void registerDryingRecipe(Block input, Block output, int time) { if(output == null || input == null) { return; } ItemStack stack = new ItemStack(input, 1, OreDictionary.WILDCARD_VALUE); addDryingRecipe(new DryingRecipe(new RecipeMatch.Item(stack, 1), new ItemStack(output), time)); }
/** * Adds a new drying recipe * * @param input Input Item * @param output Output Item * @param time Recipe time in ticks */ public static void registerDryingRecipe(Item input, Item output, int time) { if(output == null || input == null) { return; } ItemStack stack = new ItemStack(input, 1, OreDictionary.WILDCARD_VALUE); addDryingRecipe(new DryingRecipe(new RecipeMatch.Item(stack, 1), new ItemStack(output), time)); }
/** Registers this block with all its metadatas to melt into amount of the given fluid. */ public static void registerMelting(Block block, Fluid fluid, int amount) { ItemStack stack = new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE); registerMelting(new MeltingRecipe(new RecipeMatch.Item(stack, 1, amount), fluid)); }
/** Registers this item with all its metadatas to melt into amount of the given fluid. */ public static void registerMelting(Item item, Fluid fluid, int amount) { ItemStack stack = new ItemStack(item, 1, OreDictionary.WILDCARD_VALUE); registerMelting(new MeltingRecipe(new RecipeMatch.Item(stack, 1, amount), fluid)); }