Don't know how to starting modding Minecraft? We've got you covered!
First, we will require a powerful IDE. For this guide, we will use IntelliJ IDEA.
Make sure to download the Community Edition, or apply for the student pack.
You can use another IDE but IntelliJ is by far the best especially for mixin.After it has been downloaded onto your computer, open up the application, and click on the "Plugins" on the bar on the left side of your screen.
Search for "Minecraft Development", and click install on the plugin.
We also need to setup time tracking for your project. Search "Wakatime" and click install. After that, click Restart IDE.
After that, connect to your hackatime and setup Hackatime following the instructions on the website if you haven't already.
To developing Minecraft mods, we are going to use the Fabric mod loader and its API. If there's something you're confused about, go check their docs!
Fabric is a lightweight modular and modern modding toolchain that does almost nothing on its own, instead it relies more on vanillas infrastructure and a separate API mod to fill in the gaps. If you are coming from Forge, you will notice that Fabric is a lot simpler and flexible making the switch very easy.Finally, it's time to create a new project! Click on the "New Project" button, and select "Minecraft" on the left side. Choose "JDK 21". (If you can't see the option, download the JDK here!)
You can change the name and ids to whatever you like except for something generic like "hackcraft" (remember to scroll down and change the group id too!), then select "Fabric" in "Templates" and enable Git. Your command creation dialogue should look like this:
If you don't know what datagen or split sources are, disable them. If you don't care about licensing MIT is a good option.
Then, create the project. Look at what you've done: you've just setup the base of your fabric project!
Note: If you see the error "Could not resolve net.fabricmc:fabric-loom:1.10-SNAPSHOT.", go to the file gradle > wrapper > gradle-wrapper.properties and change the distribution URL to "https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip".
Now, lets launch the game for the first time! You can find the launch profiles in the top-right corner of the window. Click the dropdown menu to see the available launch profiles.
There should be a client and server profile, click on the green play button next to the label that reads "Minecraft Client".
Your game should now launch! Remember that everytime you make changes in your code and want to test it, you must relaunch Minecraft.
Quick heads up. There will be a server at the end showcasing all 1.21.8 fabric mods that are not too intrusive on gameplay (or opt-in). We urge you to take your time to plan out something that is fun above everything, think playful mobs, movement, fun PvP abilities, minigames, as long as it is fun. Keep in mind most people will only see your mod for a short amount of time, lets make this awesome!
Follow the Fabric tutorial for modding! It's excellent: if you want to add your first item, we highly suggest you follow the guide here!
Want to change some existing Minecraft behaviour? Try using Mixin!
Want to create your own textures and models? Use BlockBench (good style guide, wakatime plugin)
Go for the Fabric documentation or Fabric wiki (less good and up to date, more complete) for anything else!
Join our slack channel (#mc-modding) on Hack Club's Slack, then follow the instructions to join.
Only after joining Hack Club's Slack you may submit.