Need help decompiling IC2 to make a addon.

  • Hello! I have been modding in forge for about a year, and I have some great ideas for a addon for IC2. I have looked at Gregtech's tutorials but it seems outdated. If any of you can Help me it would be appreciated.



    Thanks! :)

  • Making an add-on does not require the IC2 decompiled code.


    To get started here, you should download the IC2 API for the version that you want. Downloads are available at the IC2 Jenkins site. Unzip the file and throw the entire thing into your development environment.


    Thats pretty much it. In my experience, you build your mod with IC2, not on it.

  • Making an add-on does not require the IC2 decompiled code.


    To get started here, you should download the IC2 API for the version that you want. Downloads are available at the IC2 Jenkins site. Unzip the file and throw the entire thing into your development environment.


    Thats pretty much it. In my experience, you build your mod with IC2, not on it.


    That's a bit vague. How to we ''throw it into the Development Environment'', if using Eclipse?


  • That's a bit vague. How to we ''throw it into the Development Environment'', if using Eclipse?

    Sorry about that. The original post did not ask about that, so I did not go into too much of detail.


    If using eclipse, it really is quite simple. Download the api here: http://ic2api.player.to:8080/job/IC2_lf/ (Not so sure about versions, but the latest -=[1.118.401]=- seems to work with 1.6.2)


    -=[ This is assuming you are using Forge with MCP ]=-


    Once downloaded, unzip the file. It should give you a folder called IC2. Simply drag the entire folder into the src package either in eclipse. If that is not working for some reason, or you are not using eclipse, navigate to "whatever-your-forge-dir-is/forge/mcp/scr/minecraft" and drop the ic2 folder in that.


    Refresh and profit!


    When you get to the point where you want to start testing things, you will need to install IC2 (the full mod) into your dev environment. To do that go to the same page as linked above and download the deobf (Short for deobfuscated) file of the same version. Put this in the mods folder located at "whatever-your-forge-dir-is/forge/mcp/jars/mods"


    If everything went correctly, next time you run minecraft (From inside eclipse) you should see IC2. (Along with those cool new items that were recently added)


    I hope that was not to confusing...

  • I rather see how do I decompile IC and fix NEI :P

    Not sure what the problem is with NEI (I never use it in my dev environments), but if you want to decompile the source code you need to 1) Get the class files out, 2) Decompile the class files


    --- Not sure if decompiling is OK or not, so if a moderator wants these details removed, please let me know! ---


    1) Download the deobf version of the mod (Here if you are lost: http://ic2api.player.to:8080/job/IC2_lf/)


    Then how ever you extract your files from jars (Just like the minecraft.jar)


    So me personally I have a mac, so I simply rename the .jar to .zip and use any old archive utility to open it. Windows, 7zip? (Not sure what the best is, but a little bird told me that it does the job)


    Once you have the class files, you need to decompile them. Lets get to that:


    2) The program I use is JD_GUI http://java.decompiler.free.fr


    It is available for mac, windows, and linux. Also on that page is decompiler plugins for Eclipse, Intelli-j, and a online version.
    It seems to work perfect for what I need!


    I hope that helps


  • Perfect! Thank you. Now more people can figure out the ''pro trick'' that is always used to make addons, rather than experiment with class names and stuffs. So long as this is posted elsewhere. I encourage you to try to find somewhere to put it, so that more people will find it. It would be a great thing to do. (I would do it, but I can't, because I don't really have the time...)