Setup
Let’s guide you through the basic setup of your Create Mod addon. There’s multiple base templates you can choose from. We’ll look at two of them.
The Official Template
This template is maintained by the Create Fabric team themselves and contains various features such as premade pieces of code inside the main class, as well as three optional recipe viewers and parchment mappings. You can find it here. Make sure to update all dependencies first. You may come across repository issues when building for the first time.
Our Template
This template is what we’ll use throughout this tutorial and wiki. It uses Yarn mappings, has three uses Yarn mappings, comes with EMI & JEI and no default code. We make sure to regularly update all dependencies ourselves and continue potential legacy support. You can find it here.
Let’s start
Use whatever template you like the most. In this tutorial, we’re using our own template. All code we’ll write is available inside the snackbag/create-fabric-addon-wiki-example-mod repository.
- Review your
fabric.mod.jsonand adjust all values necessary (don’t forget the LICENSE file itself!) - Adjust your package name (
/com/example/modid/...) andmaven_groupingradle.properties - Update your
archives_base_nameingradle.properties - Rename your
modid.mixins.json - Rename your
ExampleModandExampleModDataGeneratorclass names - Finally, update the
MOD_IDinExampleMod
Restart IntelliJ and hit the Minecraft Client run configuration.