Another issue with Copy
Bulldog83 opened this issue ยท 4 comments
Issue Description
I've created a zenClass for simplify coping recipes via RecipeBuilder and Copy.
Here is it: https://gist.github.com/Bulldog83/489b46c8ed0b39540b441a5652031357
What Happens
I have CraftTweaker errors on script load:
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[1100:crafttweaker]: globals\classes\ArtisanBuilder.class.zs}
[INITIALIZATION][CLIENT][ERROR] globals\classes\ArtisanBuilder.class.zs:78 > 2 methods available but none matches the parameters (ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])
This is usually an error in your script, not in the mod replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient]) replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
[INITIALIZATION][CLIENT][ERROR] globals\classes\ArtisanBuilder.class.zs:84 > 2 methods available but none matches the parameters (ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])
This is usually an error in your script, not in the modreplaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
[INITIALIZATION][CLIENT][ERROR] globals\classes\ArtisanBuilder.class.zs:90 > 2 methods available but none matches the parameters (ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
This is usually an error in your script, not in the modreplaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
[INITIALIZATION][CLIENT][ERROR] globals\classes\ArtisanBuilder.class.zs:96 > 2 methods available but none matches the parameters (ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
This is usually an error in your script, not in the modreplaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[int[]])
I.e.,
(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])
not equal
replaceInput(ZenTypeNative: mods.artisanworktables.builder.Copy, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])
So, Copy and Copy, returned by 'Copy.by...', are two different Copy?
Affected Versions
- Minecraft: 1.12.2
- Forge: 14.23.4.2747
- CraftTweaker: 4.1.11
- Artisan Worktables: 1.19.0
- Athenaeum: 1.14.0
Gmmm. But, the problem not in the Copy too. I changed method to:
function replaceInput(item as IItemStack, replace as IIngredient[IIngredient]) as Copy {
var copy = Copy.byOutput([item]);
for ingredient, replacement in replace {
copy = copy.replaceInput(ingredient, replacement);
}
return copy;
}
And taken error:
[INITIALIZATION][CLIENT][ERROR] globals\classes\ArtisanBuilder.class.zs:63 > 4 methods available but none matches the parameters (ZenTypeNative: crafttweaker.item.IItemStack, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])
This is usually an error in your script, not in the modreplaceInput(ZenTypeNative: crafttweaker.item.IItemStack, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])replaceInput(ZenTypeNative: crafttweaker.item.IItemStack, crafttweaker.item.IIngredient[int[]])replaceInput(string, crafttweaker.item.IIngredient[crafttweaker.item.IIngredient])replaceInput(string, crafttweaker.item.IIngredient[int[]])
Interesting....