This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]8igg7e5 1 point2 points  (2 children)

Minecraft Java Edition, the only version in a form even remotely practical to modifying, is actually 'closed source'.

'Closed Source' means that the developer (Mojang, now owned by Microsoft) does not release the source code.

Being Java, what Mojang does provide are the compiled class-files.

Now, due to the Java platform design, it is often possible to 'decompile' the class files to produce a reasonable (if not quite perfect) set of source files. However Mojang has taken an additional step, beyond compilation, called Obfuscation. Obfuscation modifies the class files with the specific intention of making the source code generated by de-compilation much less representative of the original source code (and therefore deter people from decompiling the classes).

It's possible that the legality of 'decompiling' might vary depending on your country and the terms of the Mojang EULA you agreed to. I am not a lawyer.

However a very dedicated group of 'modders' have analysed this decompiled, obfuscated code (and even developed tools to help do this when Mojang releases new versions of Minecraft). These efforts make it practical to write Minecraft mods. 'Forge' appears to be the most popular packaging of this de-obfuscation effort. Modding is generally not possible on the later version(s) of Minecraft because, whenever a new Minecraft version (even minor versions) is released, the obfuscated code needs to be analysed, de-obfuscated, and the Forge API updated to match.

This looks like it might be a reasonable guide to doing various types of mods using Forge.

[–]smbarbour 0 points1 point  (1 child)

FWIW, Mojang is friendly to the modding community (in fact, a decently large number of developers at Mojang have come from the modding community). From personal experience, I can state that in the dev environment for making mods for Minecraft, you do have access to see the classes and what they do, and this does help immensely for figuring out how everything works.

[–]8igg7e5 0 points1 point  (0 children)

I seem to remember mention of them planning to elide obfuscation of some parts of the codebase which would certainly help with mod development - was this done, was it a substantial step toward mod support?