[SOLVED] How do I add Ore Washing Plant recipes to my addon?

  • I'm creating an addon for IC2, similar to the old 1.6.4 JAMI addon but for 1.7.10. I'm starting on adding interaction with DivineRPG and I was able to successfully add macerator recipes thanks to Speiger's example. But I'm having trouble adding recipes for the Ore Washing Plant. I added the code as you can see from in the code block. I get no errors in eclipse and the game doesn't crash but nothing happens when I put the crushed ores in the Ore Washing Plant. Other Crushed Ores will get washed but the ones from the recipe I tried to add don't.

    Java: IC2RPGAddon.java
    1. ItemStack oreWashing_input = new ItemStack(crushedRupeeOre, 1);
    2. ItemStack oreWashing_output = new ItemStack(purifiedRupeeOre, 1);
    3. ItemStack oreWashing_output2 = new ItemStack(Items.string, 2);//String for testing. Change to respective tiny dust.
    4. ItemStack oreWashing_output3 = new ItemStack(Items.wheat_seeds, 1);//Seeds for testing. Change to IC2 stone dust.
    5. Recipes.oreWashing.addRecipe(new RecipeInputItemStack(oreWashing_input), null, oreWashing_output, oreWashing_output2, oreWashing_output3);

    MC: 1.7.10

    IC2: 2.2.828


    Mods folder: IC2-dev, DivineRPG, CodeChickenCore-dev

    The post was edited 2 times, last by ZephaniahNoah: Fixed grammatical errors. ().

  • The Ore Washing plant needs to know how much water to drain. Therefore you need to give it that as an argument. You do that by using the following method:

    1. NBTTagCompount nbt = new NBTTagCompound();
    2. nbt.setInteger("amount", 1000);
    3. Recipes.oreWashing.addRecipe(yourInputs, nbt, yourOutputs);
  • Ah, so that's what that's for. Thank you. It works fine now.

    EDIT: You made a small typo though. It's supposed to be NBTTagCompound not NBTTagCompount