Is decompiling always necessary?

  • I've heard contradictory information about this, so I was hoping I could get some clarification. Some say you need to decompile per Greg's instructions to create any addon whatsoever. Others say you don't need to decompile if you just want to use the IC2 API (i.e. Minecraft is decompiled, but IC2 isn't). Which is correct?


    For example, my first planned addon would create a new recipe for an existing IC2 item. I think I would just need to obtain a reference to the item's static variable, e.g. Ic2Items.cell. Then I could use that reference to instantiate a new ItemStack, and pass that ItemStack in as the output parameter for GameRegistry.addRecipe. To do that, would it be necessary to decompile per Greg's instructions? Or is there a way to simply import from the jar file, test in Forge, then compile a reobfuscated version for public release?

  • Thanks! Do you have any advice on how to bring IC2 into Eclipse? I tried putting the jar file in forge/mcp/lib. I was able to import IC2 classes and compile that way, but I got runtime errors when MC launched. Since it sounds like you've been through this before, perhaps you could give me a pointer or two? It would be much appreciated. Thanks again.

    • Official Post

    I have unzipped the IC².jar into the lib Folder of MCP. Then I just looked through the Bytecode of IC² via Eclipse to find the Names I am looking for, make either a Dummy Class where the IC² File should be or use regular Reflection to grab the Value.