TConstruct Casting outputs first table recipe.
Jomik opened this issue ยท 4 comments
I made this script:
https://gist.github.com/Jomik/376a33b61c27ac478e9299dffd16b1c2
But it only seems to work on the first table recipe
Casting.addTableRecipe(<tconstruct:tool_rod>.withTag({Material: "thundersteel"}), liq_ts * 144, <tconstruct:cast>.withTag({PartType: "tconstruct:tool_rod"}), false, 66); Casting.addTableRecipe(<tconstruct:tool_rod>.withTag({Material: "thundersteel"}), liq_ts * 144, <tconstruct:clay_cast>.withTag({PartType: "tconstruct:tool_rod"}), true, 66);
If I use any other sort of cast, I still get a tool_rod. (Except for the ingot and nugget casts, as they're different IDs, not NBTs).
I have tried switching it around, resulting in always the first line to be the one that counts. Seemingly ignoring the required NBT tag in the cast.
I have copied the dump from /mt tconstruct casting, and simply replaced for thundersteel.
you need to use withOnlyTag for recipe inputs.
read this: http://minetweaker3.powerofbytes.com/wiki/Tutorial:Advanced_Recipes
Awesome, quick response.
Results in a different error, however?
ERROR: natural_pledge.zs:70 > a method available but none matches the parameters (minetweaker.item.IItemStack, minetweaker.liquid.ILiquidStack, minetweaker.item.IIngredient, bool, int)
This is usually an error in your script, not in the mod
addTableRecipe(ZenTypeNative, ZenTypeNative, Optional ZenTypeNative, Optional ZenTypeBool, Optional ZenTypeInt )
https://gist.github.com/Jomik/cf561c7c2f85a95fc25a611bba948780
Seems this happens because of the IIngredient.
But I don't see WHY this should cause an error?
ZenTypeNative isn't very informative.
I am giving it a IItemStack, ILiquidStack and IIngredient, as per the wiki.
It works fine as long as I only give the IItemStack and ILiquidStack, but then I have the same issue as previously. As soon as I add the tconstruct:cast.onlyWithTag(...) it stops working, as that is an IIngredient, which apparently doesn't cast to ZenTypeNative ?
Shouldn't addTableRecipe take (IItemStack, ILiquidStack, IIngredient) ?
Currently it takes (IItemStack, ILiquidStack, IItemStack).
https://github.com/jaredlll08/ModTweaker/blob/master/src/main/java/modtweaker/mods/tconstruct/handlers/Casting.java#L52
Can I convert the IIngredient to an IItemStack, while keeping the "onlyWithTag" property? :)