Closed chemlzh closed 1 year ago
that's not a bug. you need to give it an itemStack provider. not an itemstack
but i see why you were confused, the docs is wrong
that's not a bug. you need to give it an itemStack provider. not an itemstack
Then how can I do to convert itemStack to itemStackProvider? Using ItemStackProvider.none(...) ?
yes
ItemStackProvider.none(<item:tfc:metal/double_sheet/copper>);
Today I tried the modified welding recipe, and the game threw this error.
Is there any parameter that I have forgotten to fill in?
I have found the question: in the newer version of TFC: TNG (for my condition, it's 1.18.2-2.2.21), the welding recipe also has a forging bonus boolean variable called combineForgingBonus.
public WeldingRecipe(ResourceLocation id, Ingredient firstInput, Ingredient secondInput, int tier, ItemStackProvider output, boolean combineForgingBonus)
{
this.id = id;
this.firstInput = firstInput;
this.secondInput = secondInput;
this.tier = tier;
this.output = output;
this.combineForgingBonus = combineForgingBonus;
}
And the WeldingRecipe in your TFCTweaker doesn't have this variable, therefore bug has occured.
public void addRecipe(String name, IIngredient input1, IIngredient input2, int tier, TFCItemStackProvider output) {
CraftTweakerAPI.apply(new ActionAddRecipe<>(this, new WeldingRecipe(Constants.identifier(name), input1.asVanillaIngredient(), input2.asVanillaIngredient(), tier, output.getInternal())));
}
i see. will look into it.
[Mod Version] Forge: 1.18.2-forge-40.2.4 CraftTweaker: CraftTweaker-forge-1.18.2-9.1.207.jar TerraFirmaCraft: TerraFirmaCraft-Forge-1.18.2-2.2.21.jar TFC tweaker: TFCTweaker+1.18.2-0.0.2.jar
[Bug Description] Copy addRecipe line from docs to add welding recipe, save as .zs file, and put it under the script folder
Enter the game, type "/reload" and press enter key. Waiting for some time, and CraftTweaker will throw error message.