This template offers a foundation for creating mod variants of datapacks compatible with major mod loaders including Forge, NeoForge, Fabric, and Quilt (Fabric API required for Fabric and Quilt). It simplifies the process for developers to craft datapacks that seamlessly operate as mods in Minecraft.
- Universal compatibility: Works seamlessly with all Minecraft mod loaders, including Forge, NeoForge, Fabric, and Quilt, requiring no specific mod loader.
- Seamless integration with existing datapack structures: Allows for easy integration of additional features into existing datapack setups without the need for extensive restructuring.
- Important note for Fabric and Quilt: Fabric API is necessary for loading the "mod" as a datapack; without it, the mod datapack will not work.
- Java Development Kit (JDK) is recommended but not necessary
- Basic knowledge of Minecraft datapack creation and modding
- Use this template to instantly create a new GitHub repository based on this template. (optional)
- Clone or download this or the newly created repository to your local machine.
- Customize the datapack according to your requirements.
- To make modifications to the datapack, edit the content of the
src/main/resources
directory. - To modify mod/datapack information (such as name, description, etc.), edit the
gradle.properties
file.
- To make modifications to the datapack, edit the content of the
- Build the project:
- If using Java JDK:
- Execute the command
gradlew build
. - Locate the output JAR file under
build/libs
. - Copy and rename the generated JAR to
.zip
for the datapack version.
- Execute the command
- If NOT using Java JDK:
- Ensure to modify the following files:
pack.mcmeta
,mods.toml
,neoforge.mods.toml
,fabric.mod.json
, andquilt.mod.json
, as their information is retrieved using variables from the buildscript and thegradle.properties
file. - Compress the contents of the
src/main/resources
folder into a ZIP archive. - Rename the compressed ZIP archive to
.jar
for the mod version.
- Ensure to modify the following files:
- If using Java JDK:
- Once built, upload both the built JAR file and the renamed ZIP copy to your mod hosting platform.
When uploading both the mod and datapack variants to CurseForge, ensure that at least one of the files includes an additional file or modification to prevent rejection due to duplicate files. CurseForge's hashing check will identify duplicates, resulting in rejection if the hashes match. Adding a dummy file, for instance, is one way to achieve this differentiation.
Contributions are welcome! If you have suggestions, feature requests, or bug reports, please open an issue or submit a pull request.
This project is licensed under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.