This repository now demonstrates a multi-loader layout:
mod-template/
├── common/ # shared Java-only logic (no loader APIs)
├── loader-fabric/ # Fabric/Loom project, applies build.main.gradle
└── loader-forge/ # NeoForge project powered by ModDevGradle
Use common for gameplay/state code, and keep loader shims thin.
- Java Development Kit (JDK) 21 or higher
- Git
Gradle is provided via the wrapper script included in this repository.
Clone the repository and invoke the build for a specific loader/version:
# Fabric 1.21.1
./gradlew :loader-fabric:build -PmcVersion=1.21.1
# NeoForge 1.21.10
./gradlew :loader-forge:runClient -PmcVersion=1.21.10Use mods/mod-template/build_all.sh (or build_all.ps1 on Windows) to iterate over every combination defined in
versions.matrix.json. The scripts run Gradle on Java 21 (loom + NeoForge requirement), while the build logic itself targets the appropriate bytecode level per Minecraft version.
- Supported NeoForge/Minecraft targets live in
versions.matrix.json. Each entry only needs themcversion; the build resolves both the matching NeoForge artifact and a compatible loader range automatically. Add optional fields (neoForge,loaderVersionRange,properties) only if you need to override the defaults. - Fabric targets default to the stable Minecraft releases at or above
buildFromVersion(fromgradle.properties). Add entries under thefabrickey inversions.matrix.jsononly when you need to pin/skip specific releases; otherwise the automation derives the list for you. - When adding another Minecraft/NeoForge pair, drop a new JSON object into the
forgelist. Optionalpropertiescan pass extra-Pflags to Gradle builds (used by the CI matrix and thebuild_all.*scripts). - Local dev uses ModDevGradle’s
forgeclientdevtarget:./gradlew :loader-forge:runClient -PmcVersion=<version>boots with the sharedcommoncode already on the classpath.
The file build.main.gradle is vendored from the upstream uebliche/mod-template repository.
To update it to the latest version, run:
curl -L https://raw.githubusercontent.com/uebliche/mod-template/main/build.main.gradle -o build.main.gradleCommit the refreshed file to keep the template in sync with upstream.
Adjust shared metadata in gradle.properties. Loader-specific files live under
their respective subprojects (e.g. loader-fabric/src/main/resources/fabric.mod.json).
This project is licensed under the Non‑Commercial MIT license. See LICENSE.md for the full license text.
Issues and pull requests are welcome. Please discuss major changes in an issue first to ensure they align with the project's goals.
Replace this section with screenshots or usage examples if available.