I am attempting to make some additional recipes for IC2. I have written mods in the past for personal use, mainly when MC was 1.00 and you could decompile IC2. Now I am attempting to use the API with undesirable results.
I have MCP 6.2, forge src installed, and the IC2 API. Decompiles fine. Code will compile. Crashes MC when ran, the problem is that the Items.getItem returns a NULL ref. My mod loads after IC2.
Below is a base example of what I am trying to do. Please let me know if I am using the API incorrectly, and if you could point me in the right direction. I have tried to approach this from many different angles, and am getting the same results (poor results).
Thanks!
Code
package net.minecraft.src;
import net.minecraft.src.ic2.api.Items;
public class mod_MakeResourcesIC2 extends BaseMod
{
public void load()
{
}
public String getVersion()
{
return "0.0.1";
}
public mod_MakeResourcesIC2()
{
ModLoader.addRecipe(new ItemStack((Items.getItem("resin")).getItem(), 5),
new Object[] { "III", "I I", Character.valueOf('I'), Block.blocksList[(Items.getItem("rubberWood")).itemID]});
}
}
Display More