- Conventions and Terminology
- Development Tools
Reading the Minecraft source is an important skill in modding. This is mainly because
To read the Minecraft source, you need to generate sources first. See the “Generating Minecraft Sources” section in Setting up a mod development environment.
To search a Minecraft class, follow these steps.
Ctrl + N
Project and Librariesor wider
Ctrl + P
In Visual Studio Code, you can also use
Ctrl + T to open the class search directly.
Locating the part of code you want to see is a challenging task. Here are some tips.
net.minecraft.server.Mainfor dedicated server).
Reading the bytecode is occasionally required because
int i = true;.
If you are not familiar with the java bytecode, reference the JVM specification.
To see the bytecode, follow these steps.
Viewfrom the main menu
If your IDE doesn't support bytecode viewing, use external bytecode viewers such as https://github.com/Konloch/bytecode-viewer.
Where is the generated sources?
It's either in the user gradle cache (
~/.gradle/caches/fabric-loom) or in the project gradle cache (
You can use the sources jar outside of your IDE.