[tutorial] How to decompile IC2 with MCP

  • Dear IC2 dev team:
    I apologise greatly if this breaks a rule or is in the wrong section if so please delete/move.


    How to decompile IC2 with MCP
    The first stage of modding is decompiling this tutorial will give you the code for IC2.
    Prep
    Grab a clean minecraft jar and install ModLoader ModLoaderMP and Forge. Test to insure it works.
    Get MCP/eclipse
    Download and install MCP (out of the scope of this tutorial but should be relatively easy, guides are on the MCP wiki). Get (and setup) Eclipse. Trust me, it makes your life far, far easier.
    Get IC2 into that Jar
    Download the IC2 Jar and move the contents (the stuff inside the IC2 Jar) into the minecraft jar. Go into the "ic2" subfolder and delete anything with Integration in the name (eg the bcIntegration folders) otherwise it won't decompile properly.
    Get Ready
    Put the bin folder containing the minecraft jar (now with IC2, ModLoader, etc in it) in the "MCP/jars" folder (the bin folder should contain a couple of other things).
    Check
    You should have in the "MCP/jars/bin" folder: A folder called "natives", jinput.jar, lwjgl.jar, lwjgl_util.jar, md5s, minecraft.jar (which should have all the mods inside it) and version.
    Decompile
    Run the decompile script and wait for it to complete you will receive warnings about the missing server jar, the modded client jar and possible a hunk reject or something akin. The final test if any of these caused a major issue should be if their is source code in "MCP\src\minecraft\net\minecraft\src".
    Mod
    Have fun!


    To test your code run the recompile script and then the test game script- if your are using Eclipse just save your files and hit the green play button.

  • Very concise and easy to follow, I commend you. I tried making an addon once or twice before, but got stumped when I ran into npe's all over the place. I figured I did it wrong, and got a bit overwhelmed. I might try again now tho...

    I5 2500K | 4GB Cosair Vengence | Radeon 6850 | Rosewill 600w PSU | GigaByte Z68MA | CM Elite 311 | Dell 19" 720p (upgrading soon!)| Hitachi 500 GB 7200 HDD | LG 24X |Windows 7 (Genuine!)
    Alblaka in a Lightning Rod suggestion thread...[/size]

  • When I try to decompile it with MCP. I get this error.

    Quote

    Unrecoverable error during obfuscation, see log file for details.
    RetroGuard error: COM.rl.obf.classfile.ClassFileException: ClassNotFound buildcr
    aft/api/ILiquidContainer

    EDIT, im retarded, and fail to read the part where you said to delete the intergration things.

  • you do realize that you are no longer supposed to install Modloader or ModloaderMP with MCForge?
    and I already made a simple program that automates this whole process, might release it if there is enough demand

  • you do realize that you are no longer supposed to install Modloader or ModloaderMP with MCForge?
    and I already made a simple program that automates this whole process, might release it if there is enough demand


    I'd like to have something like that, if you don't mind...

    Would anyone like to try a Slowpoke Tail?! Only 1 Million Yen!


    Quote

    this isn't about arrogance or ego, I have a block that I put a lot of freaking work into


    Every Mod Author, in existence. And yet, you STILL say otherwise.

  • what i did


    in minecraftforge.com [http://files.minecraftforge.ne…e-src-1.4.7-6.6.2.534.zip] i get mcp with forge installed. I guess that only rest copy ic2 files into minecraft.jar (deleting integration of course). then i run decompile and i get a lot of errors. some of them are cutte simple to solve, but there are others ... very hard. Y think that these errors are made during deobfuscate code.


    when i solve all of ic2 code issues, i modify (for example) quantum suit amount of energy get consumed when receive damage (this is my only interest), then i get QSuitArmor.class (modified) y copy it into normal ic2.jar (i delete meta-inf) ... but, i get errors like (Entity not found or some shit).. i seems that forge isnt decompiled right.. im tired.


    I WANT LEARN TO MODD IC2, i love this mod, but i dont like some things that i want add or delete on it. PLEAseEEEEEE HELP MEE XD


    sorry for my english.. im spanish, wrong education!