Minecraft will no longer be obfuscated (elaboration)

(The long version of this page.)

First, I want to clarify the meaning of “obfuscated”. There are two possible definitions of “obfuscated code”:

  1. Scrambled code, anti-debugging techniques, encryption, and other countermeasures which make it hard to understand what code is doing.
  2. (Especially in the Java ecosystem.) Code which has had everything in it renamed to use short/meaningless variable names. This is sometimes called “shrinking” because the main purpose is to save disk space. As a byproduct, the code is hard to understand, but only because of the names; renaming everything back will make it easy to understand.

Mojang has never obfuscated the game according to the first definition. They have only ever used the tool ProGuard to shrink it.

When Minecraft modders talk about “obfuscation”, they are only talking about the names embedded in the code, and not referring to scrambled code / anti-debugging technologies / encryption, because the game doesn’t do that and has never done that.

“Deobfuscating” the game, then, is just a matter of mapping out which names go to which things.

Now, onto the subject of Mojang deciding they will not obfuscate the game with ProGuard anymore:

Does this make modding easier?

Mojang has already released deobfuscation maps for Minecraft ever since 1.15 or so.. Deobfuscation maps can be applied to the game using tools like tiny-remapper. Every modding toolchain (ModDevGradle, Fabric Loom, and so on) does this automatically:

  1. download the game
  2. download the obfuscation mappings
  3. apply them with tiny-remapper or similar (which takes like ten seconds)
  4. continue to the rest of the processes needed to set up Minecraft for modding

Now they can do this automatically:

  1. download the game
  2. continue to the rest of the processes needed to set up Minecraft for modding

No input from the modder is needed. It all happens automatically. This doesn’t need to be explained to new modders.

So, modding has not been made easier. The process was already fully automated by this point.

Will it be faster/easier to update mods to new versions?

Haha wouldn’t that be nice?

But no, this doesn’t change the actual content of the updates at all. In particular, if you go around and bug modders about “why haven’t you updated yet? I heard Mojang made modding easier!”, I will take away your computer.

Does this improve my fps?

This doesn’t change the actual content of the updates at all. In particular, it is not any easier or harder for people who make optimization mods to study what the game is doing.

Do we have Mojang’s comments and source code?

This is not a “source code release” of the game. It still has to be decompiled from the jars that Mojang provides. Compiled Java does not contain comments and source code.

However, Java decompilers are extremely sophisticated and produce high-quality, easy-to-read output. Any Java programmer can read decompiler output, it’s just like reading any other Java code. So in practice, it’s not a big deal that we don’t have a source-code release.

Does this mean mojang is winding down java edition?

There is no evidence Mojang is winding down Java edition, preparing a “final version” of the game, or anysuch.

(I think it’s kind of funny when people say “I wish Mojang would stop updating Java Edition so they’d never break mods again.”. You can achieve the same effect, today, right now, by plugging your ears and ignoring Mojang.)

Is this a modding api?

No. It is access to the same data we’ve been able to get before.

There is an officially-supported “modding API”; it’s datapacks.

Is the game open source now?

Mojang’s new deobfuscated copies of the game include a README file reminding you that the game is not open-source and remains bound by the end-user license agreement.

Mojang’s previous arrangement, of releasing the obfuscated game and also releasing deobfuscation mappings for the exact same game at the same time, was admittedly very strange. It was probably a compromise with the lawyers specifically to ensure people did not mistake the game as open-source. The README file appears to be the new compromise.

Can modders do ANYTHING that they couldn’t do before?

No. It is access to the same data we’ve been able to get before.

We actually are getting one new piece of data - the names of parameters to functions were not supplied in Mojang’s deobfuscation maps. This data is completely optional though, not necessary to read and understand the game (although it is nice to have), and was crowdsourced by the ParchmentMC project prior to Mojang’s announcement.

Was this a nice gesture from Mojang?

Well, of course it is. It’s a sign that the Java Edition team is, at best, indifferent to modding and willing to look the other way.

Compare these actions to the Bedrock Edition situation where they decided to strip all debugging data from the game. C++ is way harder to reverse engineer than Java so this was a huge blow to Bedrock Edition modding.

Does this help the modding scene overall?

Can you elaborate?

No.