Posted July 7, 20178 yr Hello, I was wondering if there was a documentation for all these p_(inert number here) variable ? For example, a function from GenLayer : /** * returns the most frequently occurring number of the set, or a random number from those provided */ protected int selectModeOrRandom(int p_151617_1_, int p_151617_2_, int p_151617_3_, int p_151617_4_) { if (p_151617_2_ == p_151617_3_ && p_151617_3_ == p_151617_4_) { return p_151617_2_; } else if (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_3_) { return p_151617_1_; } else if (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_4_) { return p_151617_1_; } else if (p_151617_1_ == p_151617_3_ && p_151617_1_ == p_151617_4_) { return p_151617_1_; } else if (p_151617_1_ == p_151617_2_ && p_151617_3_ != p_151617_4_) { return p_151617_1_; } else if (p_151617_1_ == p_151617_3_ && p_151617_2_ != p_151617_4_) { return p_151617_1_; } else if (p_151617_1_ == p_151617_4_ && p_151617_2_ != p_151617_3_) { return p_151617_1_; } else if (p_151617_2_ == p_151617_3_ && p_151617_1_ != p_151617_4_) { return p_151617_2_; } else if (p_151617_2_ == p_151617_4_ && p_151617_1_ != p_151617_3_) { return p_151617_2_; } else { return p_151617_3_ == p_151617_4_ && p_151617_1_ != p_151617_2_ ? p_151617_3_ : this.selectRandom(p_151617_1_, p_151617_2_, p_151617_3_, p_151617_4_); } } This function is pretty easy to understand as it is commented, but some aren't and sometimes waste me a lot of time for nothing. Is there really an interest in giving random-looking names to variables ? Is there a documentation about how they name their variables ?
July 7, 20178 yr ob·fus·ca·tion ˌäbfəˈskāSH(ə)n/ noun noun: obfuscation; plural noun: obfuscations the action of making something obscure, unclear, or unintelligible. "when confronted with sharp questions they resort to obfuscation" The Minecraft source is obfuscated. That's where the unreadable parameter names come from (effectively). MCP is the community's mapping of these machine-generated names back into human-readable forms. You can try updating your mappings, and if that doesn't give names to the code (potentially breaking references -- be careful), you could consider contributing mappings yourself. But for the most part, trivial methods and newer methods have fewer/worse names because people haven't bothered to give them names again, because their effort was better spent on one of many other useful tasks. Edited July 7, 20178 yr by cad97 possesive http://i1279.photobucket.com/albums/y523/textcraft/Jun%202014%20-%202/a77dd69ddfa9e622422c5e5cd7e377b14d5cdedec1b7a8e19dde68c9e22be6dfbf81219d3893f419da39a3ee5e6b4b0d3255bfef95601890afd8070929aa338b0dfc68d48355_zps0c847cf3.png[/img] I have a reputation for text walls. If you ask me a question I will most likely explain it in the most wordy way possible. -0 characters left
July 7, 20178 yr Technically there are 4 different names: The original source (only Mojang has this) The obfuscated names, aka Notch names (these are generated by the compile process and look like aa.bbcfa, you would see these if you opened the vanilla jar in JD-GUI, these will be arbitrary as source code changes) The SRG names (these are the ones you're seeing, generated by the decompile process with names like p_12345_c and func_765432_f and are generally stable as the source code changes and new versions are released) The MCP names (these are community supplied via MCPbot, mapped to SRG names) Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.