
Multiple anvil recipes do not work.
DiiioBrando opened this issue ยท 1 comments
When I try to copy the above example, I get an error in the log:
mods.rockytweaks.Anvil.addRecipe(<minecraft:book>,
[
<minecraft:quartz> * 8,
<minecraft:quartz> * 16,
<minecraft:quartz> * 32
],
[
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}),
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 2 as short, id: 16 as short}]}),
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 3 as short, id: 16 as short}]})
],
[
5,
15,
32
]
);
a method available but none matches the parameters (ZenTypeNative: crafttweaker.item.IItemStack, any[], any[], any[])
This is usually an error in your script, not in the mod
addRecipe(ZenTypeNative: crafttweaker.item.IIngredient, ZenTypeNative: crafttweaker.item.IIngredient, ZenTypeNative: crafttweaker.item.IItemStack, int, Optional ZenTypeNative: crafttweaker.recipes.IRecipeFunction)
If I try to change the code and declare an array, then the error remains, the mismatch just changes:
val Quartz = [<minecraft:quartz> * 8, <minecraft:quartz> * 16, <minecraft:quartz> * 32] as IItemStack[];
val OSTROTA = [<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}), <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 2 as short, id: 16 as short}]}), <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 3 as short, id: 16 as short}]})] as IItemStack[];
val llvvll = [5, 15, 32] as int[];
mods.rockytweaks.Anvil.addRecipe(<minecraft:book>, Quartz, OSTROTA, llvvll);
a method available but none matches the parameters (ZenTypeNative: crafttweaker.item.IItemStack, ZenTypeNative: crafttweaker.item.IItemStack[], ZenTypeNative: crafttweaker.item.IItemStack[], int[])
This is usually an error in your script, not in the mod
addRecipe(ZenTypeNative: crafttweaker.item.IIngredient, ZenTypeNative: crafttweaker.item.IIngredient, ZenTypeNative: crafttweaker.item.IItemStack, int, Optional ZenTypeNative: crafttweaker.recipes.IRecipeFunction)
How to fix the problem?
I use forge-14.23.5.2859, CraftTweaker2-1.12-4.1.20.674, MTLib-3.0.7,
rockytweaks-1.12.2-0.6.1.jar.