Jump to content

Where to find code documentation/examples


Lazauya

Recommended Posts

I'm trying to make a mod. I have a lot of coding experience, so I'm very comfortable looking at source code for examples/explanations. I just have no idea where the Forge/Minecraft sources are located.

For instance, if I want to make some kind of a multiblock structure, where could I look at the code for Nether portals?

Link to comment
Share on other sites

Documentation is in the code as Javadoc comments.

Force src is here (including test mods):

https://github.com/MinecraftForge/MinecraftForge/

Edited by Draco18s

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

You might find this tutorial project useful:

https://github.com/TheGreyGhost/MinecraftByExample

 

In order to find the code for Nether portals, you need to know a bit about the objects and datastructures used by Minecraft; that's where the various tutorials around the web can be a big help. The source code itself is generally poorly documented (very few comments in vanilla code, and somewhat patchy comments for the Forge code) and often the names of methods can be misleading or even wrong, because the code has been decompiled and then manually deobfuscated by crowdsourcing.

 

So for example for NetherPortals, the relevant code is in NetherPortalBlock and PortalSize, but it will be difficult to understand what's going on.  You might be better off with BedBlock or DoorBlock but even those are likely to be hard work until you have a number of the key concepts around blocks and blockstates under your belt.

 

-TGG

 

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.