alcatrazEscapee / tinkers-forging

A Minecraft mod that adds TFC Style Forging to 1.12+
https://minecraft.curseforge.com/projects/tinkers-forging
GNU General Public License v3.0
15 stars 5 forks source link

Count Support for Anvil CraftTweaker Support #25

Closed Loriborn closed 5 years ago

Loriborn commented 5 years ago

Vanilla Tinkers Forging recipes require specific amounts of ingots in order to create a component, but trying to use NBT tags (ex. .withTag({Item: {Count: 2}}) ) doesn't actually work and thus there's no way to make certain recipes more expensive than others, unless there's something I'm missing. IIngredient methods, like .amount(x) also do not work.

alcatrazEscapee commented 5 years ago

An ItemStack doesn't use NBT to specify amount. To specify an amount you can use * (multiplication):

import mods.TinkersForging.Anvil;
Anvil.addRecipe(<minecraft:iron_ingot> * 3, <minecraft:iron_bars> * 8, 2, "hit_last", "hit_second_last");

Which will produce the result: example_recipe