Skip to content
Dweblenod edited this page Dec 15, 2023 · 4 revisions

Minecraft is not written with an API for modding. Instead, we make use of minecraft forge, which does several important things. Most importantly, it loads mods, patches in hooks in minecraft's code for mods to use, and more. Overall, forge helps mods do a variety of stuff without requiring mods to directly modify minecraft's code, in ways that try to ensure compatibility between forge mods.

While there are some resources to learn mod development (mcjty's tutorials is a good choice), oftentimes you need to figure stuff out by navigating source code to see how minecraft might be doing something similar to what you want to do.

However as part of making parts of minecraft accessible to modders, and still keep general compatibility between mods, forge provides different means of doing certain things that is not equal to how vanilla does it. Notably, this includes how to use most registries, and defining new network packets. You should typically catch these differences (and also see other useful API-elements) by checking out the minecraft forge docs.

There is also a forge community wiki which is a good alternative to the forge docs.

Forge also has a discord server where you can ask for help with certain things.

Git and Github best practices

  • Pull Requests can get messed up in different ways. Such as issues with Commit history or being based off of the wrong release branch. When this happens, your first instinct should not be to delete either the Pull Request itself or the branch you have created for it.