ViaFabricPlus uses Gradle, to make sure that it is installed properly you can check Gradle's website.
- Clone the repository using
git clone https://github.com/ViaVersion/ViaForge. - CD into the local repository.
- Run
./gradlew build. - Open the folder as a Gradle project in your preferred IDE.
- Run the mod.
- Create a new branch for your feature/bugfix (e.g.
feature/fix-xyzorfix/fix-xyz) - Implement your feature/bugfix and make sure it works correctly
- Clean your code and make sure it is readable and understandable (e.g. use proper variable names)
- Use the Google java code style (https://google.github.io/styleguide/javaguide.html) and format your code accordingly
- Create a pull request and wait for it to be reviewed and merged.
- You're done, congrats!
- Create a new branch for the new version (e.g.
update/1.20.6) - Create a new
viaforge-mc<version>folder in the root directory of the project - Add a
gradle.propertiesfile with theforge_versionset (Available at https://files.minecraftforge.net/) - Register it inside the
settings.gradlefile - Copy the code from the previous version and update it accordingly
The build.gradle file contains the shared build code for all submodules. Build code for only specific versions
of the game can be wrapped with checks using the versionId integer which will be parsed from the forge_version.
An example would be:
if (versionId >= 1_13_2) {
// We don't need to package mixins into Forge 1.13+ jars, since Forge already has it
exclude("org/spongepowered/**")
}Shared source code is inside the src/main/java root folder, while version-specific code is inside the /viaforge-mc<version> folders.