Mod templates tailored towards use at ModFest events. Uses local copying to not pollute your commit log (or repo header).
On Modrinth:
- Click
+->🧊 New Project - Enter a mod name and short summary of your intended mod
- Leave the URL (aka "mod slug") as default (
name-of-your-modin kebab case) - Click
+ Create Project
If the mod name is taken, come up with a new name!
On this template page:
- Click
🔌 X Branchesand select your desired platform - Click the green
< > Codebutton and selectDownload as Zip
Anywhere on github:
- On the top bar, click
+ (Create new...)->New Repository - Type your mod slug under "repository name"
- This should match your modrinth URL
- Check "add license" and pick one (we recommend EUPL-1.2 - click
MITand copy it in later) - Click
Create repository
On your new mod repo page:
- Click
About ⚙️and enter a short mod summary - Click
🔌 X Branches, above the file view and clickView all branches - On
main, click...->✏️ Rename branchand enter the branch name you downloaded - Click the
< > Codetab to return to the main repo page - Click the green
< > Codebutton left of the about section and clone the repo locally usinggitorghas indicated - Copy the contents of the previously downloaded zip (excluding LICENSE) into your cloned folder.
- Open the cloned folder in your preferred IDE, e.g. IntelliJ IDEA CE
In your IDE:
- Commit the template (Ctrl+K in IntelliJ), adding all files, with the message
modfest template - Copy any preferred license content into
LICENSE(e.g. EUPL-1.2) - Open
gradle.propertiesand replace the following:grouptoio.github.{username}(as below) or if you own a domain e.g.hostname.tld, you can usetld.hostnameusernameto your github username (as it appears in your repo URL)slugto your mod slug (as it appears in github and modrinth URLs)modIdto your mod ID (in snake case, e.g.name_of_your_mod- not too long!)modDescriptionto your short mod summaryauthorsto your handle/name, along with any other authors (comma-space-separated -me, you, another)contributorsto anyone who helped you (comma-space-separated -me, you, another), or just blank (contributors=)licenseto your license identifier (e.g.MITorEUPL-1.2)
- Expand
src/main/java/io/github/username/modid/in the left pane- Double click
🇨 ModIdand edit"mod_id"and[Mod ID]to your ID and mod name respectively.- Optionally, uncomment the logger line and change it to have a unique message
- Right click
🇨 ModIdand selectRename..., then enter your Mod ID in PascalCase and clickRefactor - Directly above, right click
📁 modidand selectRename..., then enter{group}.{modid}(ID in flatcase)
- Double click
- Expand
src/main/resources/assets/mod_idin the left pane- Open
mod_id.mixins.jsonand editio.github.username.mixinto{group}.{modid}.mixin - Right click
mod_id.mixins.jsonand selectRename..., replacingmod_idwith your mod ID (in snake_case) - Crack open
icon.pngin an image editor and scribble something vaguely resembling your mod - Below
assets, right clickmod_idand selectRename..., entering your mod ID (in snake_case)
- Open
- Run
./gradlew runClientto validate the mod launches - Commit and push these changes (Ctrl+K in IntelliJ) with the message
initial commit- check "amend" if you prefer one initial commit.
Check out the fabric modding wiki for the basics on your version!
Note that, for this template:
- Changing the mod description via
README.md, not modrinth! - Metadata usually in
fabric.mod.jsonhas been migrated togradle.propertiesfor easy editing - Dependency versions usually in
build.gradleare inlibs.versions.tomlfor programmatic use - Whenever you add a new feature, always use
./gradlew runClientto test it, then push a commit describing your changes!
On Modrinth's Personal access tokens page:
- Click
+ Create a PAT - Enter
Github Actionsas a name - Check
Create versionsandWrite projects - Set the expiry to 1 year from the current date
- Click
+ Create PAT - Click the
📋button that appears with a long secret string
On your mod repo page:
- Click
⚙️ Settings->Security->Secrets and variables->Actions - Click
New Repository Secret - Enter
MODRINTH_TOKENas the name, and paste your secret string from modrinth - Click
Add Secret
On your mod repo page:
- Click
Releaseson the right pane - Click
Draft a new release - Click
Choose a tag, and enter themodVersionset ingradle.properties, then click+ Create a new tag- If you're using multiple branches to support multiple versions, you should use
modVersion+branchNameinstead
- If you're using multiple branches to support multiple versions, you should use
- Enter a description of your changes, e.g.
Initial Releaseif this is the first release - Click
Generate release notesto append useful links - Click
Publish release- without attaching any files!
After a few minutes:
- The mod jar will appear on the github release page
- A matching release will be created on the modrinth page.
You can review this process on the repo page under ▶️ Actions.
We included a thorough .gitignore for you, which blocks you from accidentally publishing files you didn't intend to.
If one of the rules gets in the way, you can use ! to add rules of what to allow.
One such example would be !src/main/resources/template.log to allow bundling template.log in your mod.