-
Keep patches to Minecraft classes together. If you need a lot of things done, you may either add to relevant forge classes or make a new class. Try not to spread out your patches across multiple disjoint lines, as this makes maintenance of your patches difficult.
-
TODO: Test Mods
-
Follow the code style of the class you're working in (braces on newlines & spaces instead of tabs in Forge classes, inline brackets in patches, etc).
- Have preliminary discussions on Discord (
#neoforge-github
) - Fork the repository
- Check out your fork
- Make a branch
- Run
gradlew setup
from the project root to decompile sources and apply current patches - Import project into your IDE (IntelliJ/Eclipse) or Reload Gradle Project
- Modify the patched Minecraft sources in
projects/neoforge/src/main/java
as needed. The unmodified sources are available inprojects/base/src/main/java
for your reference. Do not modify these. - Test your changes
- Run the game (Runs are available in the IDE)
- Run
gradlew :tests:runGameTestServer
orTests: GameTestServer
from IDE - Run
gradlew :tests:runGameTestClient
orTests: GameTestClient
from IDE
- Run
gradlew unpackSourcePatches
to generate patch-files from the patched sources - Run
gradlew applyAllFormatting
to automatically format sources - Check correct formatting with
gradlew spotlessCheck
- Commit & Push
- Make PR
- You grant NeoForged a license to use your code contributed to the primary codebase (everything not under patches) in NeoForge, under the LGPLv2.1 license.
- You assign copyright ownership of your contributions to the patches codebase (everything under patches) to NeoForged, where it will be licensed under the LGPLv2.1 license.
This is intended as a legally binding copyright assignment to the NeoForged project for contributions under the patches codebase. However you retain your copyright for all other contributions.