Jump to content

Places to find API documentation?


lonelymelon07

Recommended Posts

I've just recently started getting into Forge modding, but I've found rather a lack of documentation or proper API reference. I can follow tutorials on YouTube, sure, but I'm not the biggest fan of that other than setting me off in the right direction.

The official Forge documentation is nothing more than a brief tutorial for some basic concepts. Fine, but when I want to add a food item, for example, I find no information on the specifics of `Item$Properties#food` or its associated `FoodProperties`. My IDE (Eclipse) will tell me nothing either, and some javadocs I have found online also seem to contain no documentation whatsoever. Even trawling through source code doesn't work as all variables are named cryptically (presumably because those files are auto-generated?).

I do wonder if this is because these are part of `net.minecraft` rather that `net.minecratforge` as Eclipse does provide me with some of that information (I have just not had the need to interact with that side of the API very much).

Is there any proper documentation for `net.minecraft`? If so, where can I find it, and if not, where else can I find decent, preferably non-video tutorials or API references?

Link to comment
Share on other sites

Long answer short:
No, there is no documentation.

Longer answer:
The code changes so often and so dramatically that any attempt to document it is impossible (there are a few people who've tried, the last time I saw them update was 1.7). As such your only recourse is to read the code.

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

OK, thank you, makes sense. I suppose I will be able to find some tutorials that don't make you simple copy code.

An extra question - do you know the reason some variables are named like some kind of serial number in the source? :
 

public Material(MaterialColor p_76324_, boolean p_76325_, boolean p_76326_, boolean p_76327_, boolean p_76328_, boolean p_76329_, boolean p_76330_, PushReaction p_76331_) {
      this.color = p_76324_;
      this.liquid = p_76325_;
      this.solid = p_76326_;
      this.blocksMotion = p_76327_;
      this.solidBlocking = p_76328_;
      this.flammable = p_76329_;
      this.replaceable = p_76330_;
      this.pushReaction = p_76331_;
   }

 

Link to comment
Share on other sites

Because the when the game is compiled by Mojang, those names cease to exist. So when Forge decompiles it, it has to give them new ones. Those new ones are what's called SRG names, which are unique for every field, variable, method, and class, but are stable from one minor version to another (eg. 16.1 and 16.2 will decompile to the same SRG names). A second pass is then done to convert those into human readable names...which doesn't have a human readable name for everything, so the leftovers are left with SRG names, because someone has to go figure out what the human readable name should be and update the mapping.

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

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.