Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/player005/multiloader-mod-template
A simple Template using gradle for a fabric/neoforge multiloader Minecraft mod
https://github.com/player005/multiloader-mod-template
fabric fabricmc minecraft minecraft-mod neoforge neoforge-mod
Last synced: about 16 hours ago
JSON representation
A simple Template using gradle for a fabric/neoforge multiloader Minecraft mod
- Host: GitHub
- URL: https://github.com/player005/multiloader-mod-template
- Owner: Player005
- Created: 2024-10-31T23:04:24.000Z (19 days ago)
- Default Branch: 1.21.1
- Last Pushed: 2024-11-18T12:30:40.000Z (1 day ago)
- Last Synced: 2024-11-18T12:55:09.520Z (1 day ago)
- Topics: fabric, fabricmc, minecraft, minecraft-mod, neoforge, neoforge-mod
- Language: Java
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gradle Multiloader mod template (fabric/neoforge)
### An easy-to-use template for creating fabric and neoforge mods using gradle for Minecraft 1.20.1 and 1.21+
## Usage
0. **Create your repo**
Click the "Use this template" button in the top right to create a repository, then clone & import your new repository into IntelliJ idea (or your preferred IDE)> [!TIP]
> Select "Include all branches" when creating the repository if you want both 1.21+ and 1.20.11. **Add mod info**
Check the gradle.properties file and set your mod id, package, name and version
2. **IDE integration**
First, import your repo into IDEA and import the gradle project if it isn't importing already (this might take a while). Once done, run the `genSources` task in the fabric category and then use the "download sources" button in your IDE. This ensures you have access to the Minecraft source code in all modules
3. **Rename package**
In the `common`, `fabric` and `neoforge` modules, refactor the package name from `net.yourpackage.yourmod` to your actual package name. Also adjust the java file names and the `modID` field
4. **Done**
You can now enjoy modding in a multiloader setup!
Working run configurations are automatically generated - just select the relevant one in the top right of your IDE window and run the game right from your IDE.> [!NOTE]
> For 1.20.1 Forge run configurations to show up, run the `genIntellijRuns` task and restart IDEA## Project structure
A multiloader project consists of a root gradle project and three subprojects: `common`, `fabric` and `neoforge`.
The root project should not contain any code. It's build.gradle.kts file is used for some common configuration for all the subprojects.
The `common` subproject contains all the **common mod code**, which will be included in all built jars. It has access to all of Minecraft,
and the ability to add Access wideners and mixins (see the comments in it's build script), but no access to any modloader's API.
It's build.gradle.kts is the place to put most of your required dependencies.
The `fabric` and `neoforge` subprojects contain initialisation and **loader-specific code**, as well as loader-specific resources like `fabric.mod.json` and `neoforge.mods.toml`