Need help modding IC²

  • Okay, that put me in the right direction...But I still need a bit of help.


    When I try to make a new recipe for the Macerator, it says "The method addRecipe(ItemStack, ItemStack) in the type IMachineRecipeManager<ItemStack> is not applicable for the arguments (ItemStack, Item)" I'm not quite sure what the issue is, because even if I make the item I'm trying to get into an ItemStack, it will say this: "Type mismatch: cannot convert from void to Object"


    Also how do I use things that have Metadata in a recipe, such as the Lapotron Crystal? You can't just use, "ItemStack LapotronCrystal = Items.getItem("lapotronCrystal");"...


    Sorry for being a bothersome Noob, but I've done all the searching I can do and everything is extremely outdated.

  • Unfortunately my recipe tutorials are a little outdated. I would update them, but they seem to be changing all the time. Ergo, I am waiting on it to slow down before I continue making new tutorials.


    As of right now for recipes, (Last I checked anyway), the input is no longer a ItemStack. The input is IRecipeInput. An example on how to use that is as follows:


    Code
    Recipes.macerator.addRecipe(new RecipeInputItemStack(itemstackthinggoeshere), null, itemstack.of.an.output);



    For more advanced machines that support multiple out put (Thermal centrifuge), the output part is a vararg. That means if you want another output, simply add another itemstack to the end of you addRecipe method. Example:



    Code
    Recipes.macerator.addRecipe(new RecipeInputItemStack(itemstackthinggoeshere), null, itemstack.of.an.output, another.itemstack, yet.another.itemstack);



    As for the metadata thing. Do you mean like vanilla metadata, aka damage? Or like the recipes requires a certain amount of power to be stored in the item?

  • I would like to also point out that if your input item is in the oreDictionary, I recommend using the RecipeInputOreDict("oreDictNameGoesHere", [optional int of quantity]) for the IRecipeInput section. Once again, example:


    Code
    Recipes.macerator.addRecipe(new RecipeInputOreDict("plateTin"), null, itemstack.of.an.output);



    or in this example requiring 5 tin plates



    Code
    Recipes.macerator.addRecipe(new RecipeInputOreDict("plateTin", 5), null, itemstack.of.an.output);