【help】 recipe not recognized
mahoroa70 opened this issue · 11 comments
Issue description
It is as the title.
I got the following error log.
[INITIALIZATION][CLIENT][ERROR] Recipe_Repair.zs:6 > 2 methods available but none matches the parameters (ZenTypeNative: crafttweaker.item.IItemStack, any[], function(any,any,any)any)
This sentence was the target, but I don't know what's wrong and I can't fix it.
import crafttweaker.item.IItemStack;
val repairableweponzero_one = [<kamenridercraft4th:attache_calibur>, <kamenridercraft4th:attache_shotgun>, <kamenridercraft4th:attache_arrow>, <kamenridercraft4th:authorise_buster>,<kamenridercraft4th:progrise_hopper_blade>, <kamenridercraft4th:progrise_hopper_blade_naginata>, <kamenridercraft4th:thousand_jacker>, <kamenridercraft4th:shot_riser_gun>,<kamenridercraft4th:zaia_slashriser_sword>, <kamenridercraft4th:shot_abaddo_gun>, <kamenridercraft4th:slash_abaddo_sword>] as IItemStack[];
for counter, nowItem in repairableweponzero_one {
recipes.addShapeless(nowItem, [repairableweponzero_one[counter].anyDamage().onlyDamaged().marked("source"), <kamenridercraft4th:hiden_metal>], function(output, input, crafting) {return input.source.withDamage(input.source.damage - 500);});
}
Is it bad to use items from other mods...
I would appreciate it if you could tell me.
※I don't know if it's correct because I'm using Google Translate to convert it into English. I'm sorry if I'm wrong.
Steps to reproduce
No response
Script used
https://gist.github.com/mahoroa70/4b4b44ce192b55bbc6f12cfb023f4dfa
The crafttweaker.log file
https://gist.github.com/mahoroa70/d0c6674a8a19d71ed500919ba520272e
Minecraft version
1.12
Modloader
Forge
Modloader version
1.12.2-14.23.5.2860
CraftTweaker version
2-1.12-4.1.20.680
Other relevant information
- CutAll v2.5.2
- DigAll v2.3.2
- MineAll v2.6.6
- RosettaEnchant v0.0.9
- StorageBox v3.2.0
- Uncrafting 1.8 beta6
- AkutoLib 3.0.1
- AppleSkin mc1.12 1.0.14
- BaseMetals 1.12 2.5.0 rc2.332
- BedrockLayer 1.11.2 v1.2.4
- BetterFps 1.4.8
- BrandonsCore 1.12.2 2.4.20.162 universal
- carryon 1.12.2 1.12.6.20
- ChickenChunks 1.12.2 2.4.2.74 universal
- CodeChickenLib 1.12.2 3.2.3.358 universal
- compactmachines3 1.12.2 3.0.18 b278
- Controlling 3.0.10
- CosmeticArmorReworked 1.12.2 v5a
- CraftTweaker2 1.12 4.1.20.680
- cxlibrary 1.12.1 1.6.1
- Draconic-Evolution 1.12.2 2.3.28.354 universal
- Durability+Show 1.12 5.0.0
- EnderCore 1.12.2 0.5.76
- EnderIO 1.12.2 5.3.70
- EnderIO conduits mekanism 1.12.2 5.3.70
- EnderIO endergy 1.12.2 5.3.70
- EnderIO zoo 1.12.2 5.3.70
- EnderStorage 1.12.2 2.4.6.137 universal
- ExtremeReactors 1.12.2 0.4.5.68
- Forgelin 1.8.4
- ForgeMultipart 1.12.2 2.6.2.83 universal
- ftb ultimine 1202.3.5
- FullscreenWindowed 1.12 1.6.0
- GunpowderLib 1.12.2 1.1
- industrialforegoing 1.12.2 1.12.13 237
- IntegrationForegoing 1.12.2 1.11
- InventoryTweaks 1.64+dev.151
- ironchest 1.12.2 7.0.72.847
- jei 1.12.2 4.16.1.302
- JEROreIntegration 1.12.2 1.1.0
- journeymap 1.12.2 5.7.1
- JustEnoughIDs 1.0.4 SNAPSHOT thin
- JustEnoughResources 1.12.2 0.9.2.60
- kamenridercraft4th 1.12.2 v.1.11.4
- keywizard 1.12.2 1.7.3
- Mekanism 1.12.2 9.8.3.390
- MekanismGenerators 1.12.2 9.8.3.390
- MekanismTools 1.12.2 9.8.3.390
- MineMenu 1.12.2 1.6.11 universal
- MineTweakerRecipeMaker 1.12.2 1.2.2.30
- MMDLib 1.12 1.0.0 rc2.36
- modtweaker 4.0.20.11
- MouseTweaks 2.10 mc1.12.2
- MrTJPCore 1.12.2 2.1.4.43 universal
- MTLib 3.0.7
- MultiPageChest 1.12 1.9.1
- NaturesCompass 1.12.2 1.8.5
- NetherPortalFix 1.12.1 5.3.17
- NoMoreRecipeConflict 0.13(1.12.2)
- OptiFine 1.12.2 HD U G5
- OreSpawn 1.12 3.3.1.179
- phosphor 1.12.2 0.2.6+build50 universal
- phosphor forge mc1.12.2 0.2.7 universal
- ProjectRed 1.12.2 4.9.4.120 Base
- ProjectRed 1.12.2 4.9.4.120 integration
- RebornCore 1.12.2 3.19.5 universal
- RebornStorage 1.12.2 3.3.4.1
- RedstoneFlux 1.12 2.1.1.1 universal
- refinedstorage 1.6.16
- refinedstorageaddons 0.4.5
- rsinfinitewireless 1.2
- SpawnChecker 2.7.7.137
- stellarfluidconduit 1.12.2 1.0.3
- tesla core lib 1.12.2 1.0.18
- theoneprobe 1.12 1.4.28
- torohealth 1.12.2 11
- VanillaFix 1.0.10 150
- WR CBE 1.12.2 2.3.2.33 universal
- zerocore 1.12.2 0.1.2.9
The latest.log file
https://gist.github.com/mahoroa70/8527777bbf1b4e200f3d113fa5a6717b
Steps to reproduce
It can be reproduced by inserting the script used and the following MOD and starting it.
CraftTweaker2 1.12 4.1.20.680
kamenridercraft4th 1.12.2 v.1.11.4
modtweaker 4.0.20.11
MTLib 3.0.7
Try adding a null
as last parameter, for the RecipeAction.
Also, I'd recommend you use the version of the addShapeless
that also takes in a recipe name.
So something like
for counter, item in repairableweponzero_one {
recipes.addShapeless("repair_" + counter, item, [/*...*/], function(output, input, crafting) {/*...*/}, null);
}
I skipped the parts with /*...*/
to keep it simple, you already know what to put in there.
================
Apart from that, you may want to also check that you don't create items that have negative uses then, so maybe you want to use something like
output.withDamage(max(0, input.source.damage - 500));
thank you kindlich Thanks to you, the error that the recipe itself is not loaded has disappeared.
But this time I got this error.
[INITIALIZATION][CLIENT][ERROR] [crafttweaker | SIDE_CLIENT]: Error parsing Recipe_Repair.zs:6 -- ; expected
What should I do with this error?
Sorry, I forgot to give you the new script.
This.
import crafttweaker.item.IItemStack;
val repairableweponzero_one = [<kamenridercraft4th:attache_calibur>, <kamenridercraft4th:attache_shotgun>, <kamenridercraft4th:attache_arrow>, <kamenridercraft4th:authorise_buster>,<kamenridercraft4th:progrise_hopper_blade>, <kamenridercraft4th:progrise_hopper_blade_naginata>, <kamenridercraft4th:thousand_jacker>, <kamenridercraft4th:shot_riser_gun>,<kamenridercraft4th:zaia_slashriser_sword>, <kamenridercraft4th:shot_abaddo_gun>, <kamenridercraft4th:slash_abaddo_sword>] as IItemStack[];
for counter, item in repairableweponzero_one {
recipes.addShapeless("repair_zero_one_wepons" + counter, item, [
repairableweponzero_one[counter].anyDamage().onlyDamaged().marked("source"),
<kamenridercraft4th:hiden_metal>
],
function(output, input, crafting) {
return input.source.withDamage(max(0, input.source.damage - 500));
}
);
}
That should work with what you want.
I'm sorry, when I copied and pasted this code and started it, the first problem revived.
[INITIALIZATION][CLIENT][ERROR] Recipe_Repair.zs:6 > 2 methods available but none matches the parameters (string, ZenTypeNative: crafttweaker.item.IItemStack, any[], function(any,any,any)any)
Here is the latest error log and script.
import crafttweaker.item.IItemStack;
val repairableweponzero_one = [<kamenridercraft4th:attache_calibur>, <kamenridercraft4th:attache_shotgun>, <kamenridercraft4th:attache_arrow>, <kamenridercraft4th:authorise_buster>,<kamenridercraft4th:progrise_hopper_blade>, <kamenridercraft4th:progrise_hopper_blade_naginata>, <kamenridercraft4th:thousand_jacker>, <kamenridercraft4th:shot_riser_gun>,<kamenridercraft4th:zaia_slashriser_sword>, <kamenridercraft4th:shot_abaddo_gun>, <kamenridercraft4th:slash_abaddo_sword>] as IItemStack[];
for counter, item in repairableweponzero_one {
recipes.addShapeless("repair_zero_one_wepons" + counter, item, [
repairableweponzero_one[counter].anyDamage().onlyDamaged().marked("source"),
<kamenridercraft4th:hiden_metal>
],
function(output, input, crafting) {
return input.source.withDamage(max(0, input.source.damage - 500));
}, null
);
}
try this?