How to decompile it

    • Official Post

    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.

    I have already made 3 Softwareprojects (Not much of course) and without that what ive said here, my Code would've been a GIANT mess, like Notch's old Minecraftcode (which is partially still there), but even worse.

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

    Even you complained about the Nondecompilability of the E-net, so what do you have against suggesting a positive change?

  • As a programmer, I'm always wary of sweeping pronouncements like "this language feature MUST NEVER be used". It's strongly reminiscent of the decades-old argument that started with "GOTO considered harmful". Being a lazy bastard, I won't look up the history of that particular mess, but it's worth noting the Jargon File mentions "The structured-programming wars eventually blew over with the realization that both sides were wrong[...]".


    In my opinion, any language feature has its intended use case and any sweeping generalization along the lines of "this is never a good idea" is overstating the point rather harshly. Something may be inadvisable, undesirable, confusing or even just simply backwards, but that doesn't mean anyone can say, without looking at a specific example thereof, whether or not it is misused.


    All that being said, as I've never really looked at Java seriously, I can't speak to the relative merits of the specific language features mentioned in this argument. But I'd be surprised if Java were such a poor language as to include features that are harmful no matter where they were used.

    • Official Post

    As a programmer, I'm always wary of sweeping pronouncements like "this language feature MUST NEVER be used".

    I said "should" and not "must". Of course that Feature has a Sense, but only for small Datastructures.

    It's strongly reminiscent of the decades-old argument that started with "GOTO considered harmful". Being a lazy bastard, I won't look up the history of that particular mess, but it's worth noting the Jargon File mentions "The structured-programming wars eventually blew over with the realization that both sides were wrong[...]".

    Thats why there is no GOTO in Java.

    In my opinion, any language feature has its intended use case and any sweeping generalization along the lines of "this is never a good idea" is overstating the point rather harshly.

    Inner Classes can be used to make a better internal Datastructure, without adding new Classfiles. Its good for small things like ArrayLists or BinaryTrees, but its not a good Idea to make large Inner Classes (for readability and decompilability), when its still possible to use just a new File (What is also better for Versioning Systems like Git).

    Something may be inadvisable, undesirable, confusing or even just simply backwards, but that doesn't mean anyone can say, without looking at a specific example thereof, whether or not it is misused.

    In that case its just undecompilable, so there went something wrong.

    All that being said, as I've never really looked at Java seriously, I can't speak to the relative merits of the specific language features mentioned in this argument. But I'd be surprised if Java were such a poor language as to include features that are harmful no matter where they were used.

    Let's describe that specific Feature with Fun:
    YO DAWG, i heared you like Classes, so we put Classes in your Classes so that you can be Objectorientative, while being Objectorientative.

  • I said "should" and not "must". Of course that Feature has a Sense, but only for small Datastructures.

    Understood. It just felt a little more absolute than that on first read.


    Thats why there is no GOTO in Java.

    That misses the point -- the choice of not having a GOTO keyword doesn't actually mitigate spaghetti code in and of itself, whereas promoting good coding style and providing ways of achieving the same goals in a more readable fashion does. The example was given as one of a sweeping generalization that was misapplied.


    Inner Classes can be used to make a better internal Datastructure, without adding new Classfiles. Its good for small things like ArrayLists or BinaryTrees, but its not a good Idea to make large Inner Classes (for readability and decompilability), when its still possible to use just a new File (What is also better for Versioning Systems like Git).
    [...]
    In [this] case its just undecompilable, so there went something wrong.

    That's still making the assumption the inner classes being discussed here are large or unreadable. They don't decompile, but allowing them to do so may not have ever been a priority (or even desired at all). We'd also still be assuming there aren't other reasons for this design decision. Since we haven't seen the code, we can't really say.


    On the other hand, that's getting a bit too meta for me, and I'll bow to your superior knowledge of the language in as much as you are probably right that they could be avoided in this case.


    Let's describe that specific Feature with Fun:
    YO DAWG, i heared you like Classes, so we put Classes in your Classes so that you can be Objectorientative, while being Objectorientative.

    Okay, that made me laugh. Thanks for that.

  • I still have no clue. Can someone please just explain step-by-step how to make an addon (but skip all the coding part) So I just want to know: How to decompile, and then recompile and anything else that I should know about. Thanks.

    • Official Post

    They don't decompile, but allowing them to do so may not have ever been a priority (or even desired at all).

    Thats, why we are suggesting it.

    Since we haven't seen the code, we can't really say.

    Of course we havnt seen it. How would that even be possible?

    On the other hand, that's getting a bit too meta for me, and I'll bow to your superior knowledge of the language in as much as you are probably right that they could be avoided in this case.

    Well, every Programmer has his favorite Programminglanguage and knows (at least a bit) how to use it. ;)


    I for myself like Java, because its much easier to make Computergames with it (what i'm actually planning for this Semestervacation), other than C, C++ or C#, which all three need a special Case for every single OS, and also perfect handling of all the saved Variables (what is a terribly huge Errorsource).



    And now back to the OP:
    Is it possible to make it at least decompilable?

  • Well, every Programmer has his favorite Programminglanguage and knows (at least a bit) how to use it. ;)

    That is 100% true.


    I for myself like Java, because its much easier to make Computergames with it (what i'm actually planning for this Semestervacation), other than C, C++ or C#, which all three need a special Case for every single OS, and also perfect handling of all the saved Variables (what is a terribly huge Errorsource).

    Have you played around with Python at all? I've been looking at it (and pygame) with game-making in mind and, as far as I've been able to go, it seems far more powerful and quick (both in programmer time and CPU time) than I would've expected. Give it a try, you might like it.


    And now back to the OP:
    Is it possible to make it at least decompilable?

    I'm rather curious, as well. Also, what prompted this non-standard implementation?

  • I still have no clue. Can someone please just explain step-by-step how to make an addon (but skip all the coding part) So I just want to know: How to decompile, and then recompile and anything else that I should know about. Thanks.

    Go look up "minecraft coder pack". You don't need a step-by-step tutorial from us when a step-by-step tutorial from them works just as well.


    (ALSO: the newer versions of MCForge include Modloader and don't introduce decompile errors; I suggest you use it whenever modding minecraft.)

  • Thanks for trying to help, but I know how to decompile with MCP, and how to install forge to it. But I dont know how to do forge and ic2.. It just throws errors because im putting the contents of ic2.jar into the minecraft.jar which is probably wrong, but I dont know what else to do so thats why I'm asking.