Building from source - NoWordz/AtomChat-Mod GitHub Wiki
Building from Source
Repository layout
The project is a single-branch, multi-target monorepo:
shared/ platform-free logic (config, tokens, themes, banner, image loading, rich text)
layers/mapping/official/ official-mapping sources shared by NeoForge 1.21.1 and Forge 1.20.1
platforms/
1.21.1-fabric/ Fabric 1.21.1 (screen class lives in net.minecraft.client.gui.screen)
1.21.1-neoforge/ NeoForge 1.21.1
1.20.1-forge/ Forge 1.20.1 (Java 17; the other two need Java 21)
versions/ target and layer declarations (targets.json, layers.json)
tools/ generators and guards (seams, target verification)
The official mapping layer and the Fabric tree are line-equivalent twins; they differ only in Minecraft mapping names. tools/gen_seams.py regenerates the seam manifest and tools/verify_targets.py checks the target matrix.
Build
Each target is an independent Gradle project:
cd platforms/1.21.1-fabric && ./gradlew build # JDK 21
cd platforms/1.21.1-neoforge && ./gradlew build # JDK 21
cd platforms/1.20.1-forge && ./gradlew build # JDK 17
Jars land in each project's build/libs. Forge also emits a -slim jar without bundled dependencies; releases use the non-slim one. Run the targets serially in one workspace: concurrent Gradle runs in the same worktree lock and clobber each other's build state.
Tests
./gradlew test per platform runs the JUnit suites (layout, motion, parsing, asset contracts, source-level guards). Rendering itself needs the game; the offscreen render tests cover the drawable components without a client.
Version and release conventions
gradle.propertiesholdsmod_version,mod_licenseand the identity shared by all targets; platforms must not redefine them.- Release notes live in
RELEASE_NOTES.md(bilingual: Chinese first, English after the----separator); the store changelog is cut from the English block bychangelogFor()in each platform build. - Prerelease suffixes (for example
0.3.0-Preview) share the base version's notes section.