[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

    Forge: 10.13.4.1614

    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:

    Java
    1. NBTTagCompount nbt = new NBTTagCompound();
    2. nbt.setInteger("amount", 1000);
    3. Recipes.oreWashing.addRecipe(yourInputs, nbt, yourOutputs);
  • I wonder why that Parameter was an NBT, couldn't it just have been an Object Array or a Collection/List or something?

    I don't say, your "insert whatever" is bad. I'm only showing ways for making it better.
    GregTech Website
    Patreon really helps me out. If you consider funding the development of GT, so I might be able to do it fulltime, why not?
    GregTech 6, the Main Thread, Bug Reports go here too.
    I'm also on #gt-dev on irc.esper.net, if you don't want to make a Forum account just to contact me.
    (I'm there almost every day, when I'm at my own computer. Yes you can drop bugs and suggestions there too)