I don't know enough about Minecraft modding yet to be able to explain this well. But here's what you need to do to get started.
-
Make sure Java is installed. Minecraft and Minecraft mods are written in Java.
Mojang wants you to run Minecraft with the Oracle JDK, but OpenJDK has worked for me so far.
-
Clone this repository.
-
cdinto this directory and run./setup.sh. (This is not doing anything scary to your computer—it just extracts a few files fromvendor/forge-$VERSION-src.zip, which I got from files.minecraftforge.net, to the current directory.) -
./gradlew jarto build the mod.(The first time you run this, it'll download a ton of software over HTTP that will later run on your computer. So if you're security-conscious—well, sorry, that's how the Java ecosystem is. 🍌)
-
./gradlew runClientto run Minecraft with the mod installed.
If you're planning on hacking on this module, you might also want to do
./gradlew setupDecompWorkspace, which
decompiles Minecraft to Java sources,
and also unzips Minecraft Forge sources from somewhere,
and puts them all into ./build/tmp/recompSrc.