Hi! This is my documented journey to create a Minecraft Forge mod. It's been a while since I created one, and I want to see if I still remember how things work.
In addition, I'd like to try to do this using VSCode, instead of the usual IDEs recommended for this. Let's see how it goes!
Yep, the MDK. Ok, downloading the MDK for 1.12.2 - 220.127.116.1136...
Oh, before we get too far along, I'm planning to track my progress with git commits and this readme. That way, if things get broken or strange, I can use git to backup, and you and I get a nice history we can look back on.
Ok, the MDK is downloaded, let's unzip it.
The docs say to only copy
gradlew, and the
gradle directory. I'll leave out
gradlew.bat since I'm developing on Linux.
The next step is to run
gradlew setupDecompWorkspace. Since this is Linux, the correct command is
./gradlew setupDecompWorkspace, since the working directory isn't in the path.
Ok, it looks like I don't have the java compiler (or JDK) installed on this computer. Your instructions to get a JDK installed for likely differ, so I'll leave this part out. DuckDuckGo is your friend.
OpenJDK 8 installed and
./gradlew setupDecompWorkspace is successful.
The two commands we want for testing are:
Before we do that, we need a mod. Forge comes with a sample mod, but the instructions don't tell us to copy that. Let's do that though, so we have a starting place, and we can test this setup works
src directory from our unzipped MDK directory.
[19:59:27] [Client thread/INFO] [examplemod]: DIRT BLOCK >> minecraft:dirt
Great, it works! At this time, before we commit we probably want to create a `.gitignore and add a couple of things to it.
Before I get too far into modding, I want to know that we can build our mod correctly as well. I'm going to to use MultiMC because it works all 3 major operating systems and makes creating Minecraft instances with the exact versions and mods you want so easy.
[20:08:03] [Client thread/INFO] [examplemod]: DIRT BLOCK >> minecraft:dirt
Perfect! At this point, let's calls this version 0.1.0
This post was created as part of the README for my Panda's mod, but given my habit of not completing things I thought I'd share this part here in case it helped others. Thoughts and feedback welcome.