-2
\$\begingroup\$

So, I'm new to the Minecraft modding community and trying to understand where to start. I've attempted to do it before, but dropped it to the complexity of starting and the lack of a site like this to help (Mind that I'm also semi-new to Java, but have worked extensively in Javascript and Python. I understand how Java is different from the two).

I have downloaded MCP 9.08 (Decompiles 1.7.10), and deobfuscated Minecraft. I'm looking to mod client, so I didn't supply it with a server jar. Everything seemed to work fine in decompile (Only error was it couldn't find the server jar). I can find my files in /mcp908/src/minecraft/net/minecraft. However, if I open up one of the classes in, say, block, I see a bunch of variables starting with p_ and ending with _. Is there any way to make these variables more decipherable, to understand what's going on so I can learn by example? Thank you.

\$\endgroup\$

closed as off-topic by Kromster says support Monica, bummzack, Seth Battin, congusbongus, Josh Aug 25 '14 at 15:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Kromster says support Monica, bummzack, Seth Battin, congusbongus, Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Is this the same question? \$\endgroup\$ – Anko Aug 23 '14 at 20:31
  • \$\begingroup\$ Sorry, I said decompiles instead of deobfuscated. The answer is to use MCP to deobfuscate it, and that's what I've done, and still getting the weird variables. \$\endgroup\$ – Elias Benevedes Aug 23 '14 at 22:35
  • \$\begingroup\$ Despite the text of the standard close reason, I don't think this fits on SO necessarily -- it's just a general programming question about coping with extracted "deobfuscated" variable names from tools that produce them. Luke's answer below is still pretty much the solution: you have to do it yourself (or find some documentation from somebody who has). \$\endgroup\$ – Josh Aug 25 '14 at 15:37
1
\$\begingroup\$

Mojang obfuscate their code whenever they bundle it into a .jar, which is essentially renaming all their variables and methods to gibberish, presumably to prevent others from cracking or modding it

The MCP team has done a great job of deobfuscating this code and deducting what each variable roughly means, but there are still some that are too arbitrary to understand what they do. Hence they remain obfuscated, and are just assigned a random number or string etc.

So in short, if you want to get a proper name for these variables you'll need to find out what they do/change and rename them yourself

\$\endgroup\$
  • \$\begingroup\$ You do not really want to rename the variables/methods from the original source code or reobfuscating the mod will not work correctly and your mod will not work. \$\endgroup\$ – tkausl Aug 25 '14 at 16:33
  • \$\begingroup\$ @tkausl is there a way to change the obfuscation mappings? \$\endgroup\$ – Luke Aug 25 '14 at 16:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.