Skip to content

Building from Source

jhfuheuiwfh edited this page Oct 11, 2026 · 2 revisions

🧱 Building from Source

Compile NEXUS Bodycam yourself β€” Java 17 target, Gradle 8.5, Fabric Loom.


Prerequisites

Tool Notes
JDK 17 or 21 JAVA_HOME pointing to it. (On this project a JDK 8 on PATH is not usable.)
Git to clone the repository
TACZ jar goes into libs/ β€” not shipped in the repo (third-party binary), see libs/README.md

No global Gradle install is needed β€” the wrapper is included (gradlew / gradlew.bat, Gradle 8.5).


Steps

git clone https://github.com/jhfuheuiwfh/nexus-bodycam-mod.git
cd nexus-bodycam-mod

# 1. put the TACZ jar in libs/  (compile-only dependency)
#    libs/TACZ-Refabricated-1.20.1-0.7.1-forge1.1.8-hotfix2.jar

# 2. build
./gradlew build          # Windows: gradlew.bat build

Result:

build/libs/NEXUS-bodycam-1.4.3+1.20.1.jar

Copy that jar into your mods folder to test it.

Windows tip: if JAVA_HOME is not set, run it inline:

$env:JAVA_HOME='C:\Path\To\JDK-17'
.\gradlew.bat build --no-daemon --console=plain

What the build does

  1. processResources stamps the version from gradle.properties into fabric.mod.json.
  2. compileJava β€” Java 17, UTF-8, -Xlint:unchecked -Xlint:deprecation.
  3. Loom remaps the jar to intermediary β†’ build/libs/…jar.

Versions (gradle.properties)

minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.15.11
fabric_version=0.92.2+1.20.1
modmenu_version=7.2.2
mod_version=1.4.3+1.20.1
maven_group=dev.bodycam
archives_base_name=NEXUS-bodycam

Bump mod_version for every release and keep it in sync with the README/changelog.


Common build errors

Error Cause / fix
Task 'build' not found You are not in the repo root (or build.gradle is missing)
Mod was built with a newer version of Loom The TACZ jar still has Fabric-Loom-Version: / Fabric-Gradle-Version: lines in its MANIFEST β€” remove them
tiny-remapper: unfixable conflicts Delete the four com/tacz/guns/client/renderer/item/*ItemRenderer.class files from the TACZ jar
Unable to locate obfuscation mapping The jar must be on modCompileOnly, not plain compileOnly (already configured)
DNS / repository timeouts Transient β€” just rerun the build
Out of memory org.gradle.jvmargs=-Xmx2G is already set; close other heavy apps

Project layout

β”œβ”€β”€ build.gradle              # Fabric Loom build
β”œβ”€β”€ settings.gradle           # rootProject.name = NEXUS-bodycam
β”œβ”€β”€ gradle.properties         # versions
β”œβ”€β”€ gradlew / gradlew.bat     # wrapper (Gradle 8.5)
β”œβ”€β”€ libs/                     # local third-party jars (git-ignored)
β”œβ”€β”€ src/main/java/dev/bodycam/
β”‚   β”œβ”€β”€ camera/               # effects engine, springs, water, TACZ bridge
β”‚   β”œβ”€β”€ config/               # BodycamConfig (JSON, validated)
β”‚   β”œβ”€β”€ core/                 # GameState + RenderCoordinator
β”‚   β”œβ”€β”€ gui/                  # config screen
β”‚   β”œβ”€β”€ mixin/                # camera/entity/renderer mixins
β”‚   └── compat/               # Iris bridge
β”œβ”€β”€ src/main/resources/
β”‚   β”œβ”€β”€ assets/bodycam/       # shaders, sounds, textures, lang
β”‚   β”œβ”€β”€ bodycam.mixins.json
β”‚   └── bodycam.accesswidener
β”œβ”€β”€ docs/                     # CHANGELOG.md Β· DEVNOTES.md
└── media/                    # demo GIFs

Contributing

  • Record every change in docs/CHANGELOG.md β€” a task without a changelog entry counts as not done.
  • Keep the code working on 1.20.1 / Fabric only.
  • Be honest about AI usage: see the AI transparency statement.

← Home Β· Installation Β· Troubleshooting

Clone this wiki locally