Jump to content

Inconsistency in styling


DutchM

Recommended Posts

More of a ... idk what to call it not really bug but weirdness in the code... report than a suggestion, but I don't know where else to put it. I don't quite get why EntityPlayer#openGui deviates from Java styleguides, even though the rest of the code seems to follow them neatly. To clarify: GUI is an acronym and thus should be spelled in all caps like this: EntityPlayer#openGUI, not EntityPlayer#openGui. I don't understand why this method specifically deviates from this, especially since other abbreviations I have encountered in the code are fully capitalized.

Link to comment
Share on other sites

3 hours ago, DutchM said:

More of a ... idk what to call it not really bug but weirdness in the code... report than a suggestion, but I don't know where else to put it. I don't quite get why EntityPlayer#openGui deviates from Java styleguides, even though the rest of the code seems to follow them neatly. To clarify: GUI is an acronym and thus should be spelled in all caps like this: EntityPlayer#openGUI, not EntityPlayer#openGui. I don't understand why this method specifically deviates from this, especially since other abbreviations I have encountered in the code are fully capitalized.

Mojang obfuscates the vanilla source code. Forge uses a tool called MCP which supplies names for each variable/method/parameter. However, those names are supplied by the community, which is why there are consistency issues throughout the code.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

29 minutes ago, diesieben07 said:

EntityPlayer#openGui is a Forge method.

I thought it was a vanilla method patched by Forge... My mistake!

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Wed on't strictly follow the Java guidelines. Yes GUI is a acronym, but in the programming world, it is a word of it's own. So it can go either way.

This is a non-issue.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.