How multiversion merging works
mainForgix can merge the same mod built for several different Minecraft versions into a single jar using the mergeVersions task. This is useful for creating a single "universal" jar that works across multiple game versions.
MultiversionConfiguration options:
inputJars(FileCollection): Sets the jars to merge, one for each Minecraft version. At least two jars are required.archiveBaseName(String): Sets the base name for the merged archive. Defaults to the root project's name.archiveClassifier(String): Sets the classifier for the merged archive. Defaults tomulti.archiveVersion(String): Sets the version for the merged archive. Defaults to the root project's version.destinationDirectory(Directory): Sets the directory where the merged jar will be placed. Defaults tobuild/forgix/multiversionin the root project.
forgix {
multiversion {
inputJars = files(
project(":1.20.1").tasks.remapJar.archiveFile,
project(":1.21.1").tasks.remapJar.archiveFile
)
}
}