How to add macerator recipes?

  • Hello. I am making an addon for IC2 and I want to add a macerator recipe. However, it does not work. Here is my code:

    1. public class IC2CraftingManager extends CraftingManager{ public static void mainRegistry(){ addMachineRec(); } public static void addMachineRec(){ Recipes.macerator.addRecipe(new RecipeInputOreDict("MagnesiteOre"), null, new ItemStack(ICItems.crushMagDust, 2)); } }
  • You useing the API wrong. Let me explain it.
    IC2 have those Empty Classes laying around in the API.
    When the Game Starts and IC2 Loads it starts to fill those classes automaticly so your mods do not require IC2 (which is a nice way of doing something)

    You simply go to the class they store those recipe holders and simply say add the recipe. Make sure that you know that ic2 exsists.

    Here an example:

    1. //This comes in any of your MainClasses.
    2. public static void initRecipes()
    3. {
    4. //The Recipes class from IC2 API
    5. Recipes.macerator.addRecipe(new RecipeInputItemStack(yourInputItemStack, amount), null, yourItemStackOutput);
    6. }

    I would say extract the API files and read everything what you need. Its better to read the programm blind into the world.
    Simply the W questions:
    What do i need?
    Where do i get it?
    When do i have to use it?

    And why is optional:
    Why did they do that like this?
    Why do i need this?

    And and and. I use those Language rules in the programming. And they help imens!