Forked from jaredlll08/MultiLoader-Template
This is a customized fork of the original MultiLoader Template.
For full documentation, setup instructions, and general usage, please refer to the
original README.
This version introduces the following changes to support easier multi‑version and multi‑loader configuration:
-
Centralized Version Configuration
- Set the target Minecraft version in
gradle.propertiesunderminecraft_version. - Add a corresponding
${minecraft_version}.propertiesfile inside theversionsdirectory for version‑specific settings.
- Set the target Minecraft version in
-
Conditional Loader Subproject Inclusion
- The build automatically includes or excludes loader‑specific subprojects (Fabric, NeoForge, Forge) based on the
corresponding property (
fabric_version,neoforge_version,forge_version) defined in the${minecraft_version}.propertiesfile. - A loader subproject is excluded when its property is explicitly set to
"null"(as a string).
Example:fabric_version=nullwill exclude the Fabric subproject for that Minecraft version.
- The build automatically includes or excludes loader‑specific subprojects (Fabric, NeoForge, Forge) based on the
corresponding property (
-
Manifold Preprocessor Support
- Added the dependency
systems.manifold:manifold-preprocessorto enable conditional compilation based on Minecraft versions. - In your source code, you can now use the following syntax:
#if MC1_21_11 // Code that only compiles for Minecraft 1.21.11 #endif #if MC1_21_8 // Code that only compiles for Minecraft 1.21.8 #endif #if MC1_21_X // Code that compiles for all Minecraft 1.21.x versions #endif
- The preprocessor directives allow you to write version‑specific code blocks that are automatically included or
excluded during compilation based on the target
minecraft_version. Wildcard matching (e.g.,MC1_21_X) is also supported for version ranges.
- Added the dependency
These adjustments provide more explicit control over loader inclusion and enable powerful conditional compilation for multi‑version support, while maintaining compatibility with the original template structure.