I was able to get the mod operating correct. I ended up creating an ore handler via forge. Forge has its own version of modloader so the .addRecipe function is still valid. So basically, I am not using the IC2 API to do anything, I am using forge's ore dictionary. Problem resolved.
Posts by mkolter
-
-
Yes, I am using Forge v3.3.7.135. I will make some changes and report back. Thank you.
-
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
Display Morepackage 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]}); } }