How to decompile it

  • This is mostly (at least for me) to improve my java style, but here's how to decompile it: install forge into mcp jars/bin/minecraft.jar, extract the IC2 jar, delete ic2/whatevsintegration folders, put everything else into teh minecraft jar (same place as forge), then decompile with mcp. :)
    Mods: delete this post if it's against the rules which AFAIK don't state that this isn't allowed.

  • There are programs that do this for you such as jd-gui so I don't see why you would need to go through the hassle of this

    Is the answer to this question no?


    Quote

    Hey don't take it so hard. Ignorance is part of this generation it seems. -the wise words of XFmax-o-l

  • Do you get the E-net, or does it vanish too? Because last time i decompiled like you the E-net was missing.

    What's the class name of the e-net?
    I dunno, I was going to eat lunch at the moment, lemme check.
    Whaaa? IC2 isn't obfuscated?

  • Hmm, I looked at some source code, seems that I'm missing the E-net... Why is the E-net not there? I bet that it's in one of the integration classes if I can't find it. ?(

  • There are programs that do this for you such as jd-gui so I don't see why you would need to go through the hassle of this

    Minecraft code (including the downloadable IC2.jar file) is obfuscated -- Unless you can somehow figure out what the method (say) "abq7(i q i v s P)" refers to, using jd-gui won't get you anywhere. Also, jd-gui won't decompile mod_IC2.class anyway (it just throws up an error message, I forget the specifics).

  • Minecraft code (including the downloadable IC2.jar file) is obfuscated -- Unless you can somehow figure out what the method (say) "abq7(i q i v s P)" refers to, using jd-gui won't get you anywhere. Also, jd-gui won't decompile mod_IC2.class anyway (it just throws up an error message, I forget the specifics).

    I tried looking into the IC2.jar with JD-gui once. Holy crap there's a lot of obfuscation. An yeah, JD threw me an error about the obfuscation.

  • I tried looking into the IC2.jar with JD-gui once. Holy crap there's a lot of obfuscation. An yeah, JD threw me an error about the obfuscation.

    Is IC2 especially obfuscated? I remember it only being obfuscated enough to cooperate with the obfuscated minecraft code, maybe I was wrong. Strangely, when I extracted IC2.jar the other day I got 2 mod_IC2.class files, one with a $1 after the IC2 part.


    Graypup -- it appears that the enet doesn't survive decompilation. Does anyone have any further explanation for this?

    • Official Post

    Inner classes, most decompilers (including the finest fernflower) can't handle those properly

    Moment, you are going to tell us, that you are using inner Classes for something important like the E-net?


    That is a very bad practise (must be very old Code), i dont even know, why that is still possible in Java, as every Prof i had in Programming told me, that you should never do that.


    You Player should rewrite that Part of the E-net.

    • Official Post

    Those are actually (static) nested classes without a reference to an instance of the surrounding class.


    I highly object the opinion of your professor, nesting increases the readability a lot if it's used correctly.

    If you have Eclipse, then the readability is not really that bad, if you are making outer classes and name them correctly.


    static? One of my Profs would shoot you, for using "static" outside the "public static void main". :D


    That Prof told me also, that you shouldnt even use private Functions, but instead using Helperclasses for these Functions (Outsourcing), so that you can change one Function simply by replacing the Class-File of it, instead of replacing the Object, which uses the Function, but that is something, what Mojang needs to learn first.

  • I would say you are a fool for just following your teacher with blind devotion, but maybe is because you have little coding experience unlike the people at mojang or the Devs here.


    Everyone have a coding style, trying to impose your to someone who already have one its... well i dunno not necessary?