[Help] Better way to improve my mod recipe addition using a combination of Loops and IItemDefinitions on CraftTweaker
NovaViper opened this issue ยท 1 comments
Hi, I've designed a script that adds the recipes for different backpack colors from the mod Backpacks! however, it's really long and very hard to look at. So far, I've used IItemDefinitions
in order to call all of the metadata types of the backpack. The main issue I'm having is that each metadata type has a slightly different recipe to it (I.e: the black pack has an ink sac in the middle while the non-colored one (it's the color of leather) has no dye in it at all and so on).
My idea of solving is creating a sort of 'selector' that would declare the material type to use for each metadata type, then take that determined material and input that to the recipe line and associate that specific recipe to the metadata. But I'm not sure if such is idea possible in CraftTweaker. Do you think that is this possible at all? If not, what other way would I be able to accomplish this task?
You could, for example, use a custom function to get the desired item using the metadata.
Alternatively, you could use Arrays or Maps to get that item.
However, since this github issue tracker is only for CrT issues, you should go to jared's discord since the chance of getting help is higher there.