Jump to content

[1.8] Unreadable parameter/function names


Norazan

Recommended Posts

This might have been asked quite a few times already, but I am sort of new to Forge modding. Why do a lot of standard minecraft/forge methods and parameters have confusing names like p_78088_2_ ? I also can't seem to find any declaration on the methods. Is there any?

 

Thanks in advance.

Link to comment
Share on other sites

Not Forge's, but Minecraft's methods and fields are confusing because they are extracted from compiled code - which means that the original method and field names are usually lost.

 

As I understand it, the tools involved in the process do a best effort to extract those names, but that is a quite complex matter.

just you wait! ;)

Link to comment
Share on other sites

Those are the SRG names and they look like that because there hasn't been a friendly name applied to them yet, via MCPBot.

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.

Link to comment
Share on other sites

Looking at the code and seeing what it does.

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.

Link to comment
Share on other sites

This is not quite true. If you just decompile code compiled with javac (the normal java compiler) you get back pretty much the original code. The names match and everything. Why not with Minecraft? Because Mojang uses an obfuscator in addition to the normal compiler. This program strips all unnecessary information and renames classes, fields and methods to meaningless things.

 

True, thank you for the correction. I somehow forgot to mention the obfuscator =)

just you wait! ;)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.