Skip to content

Building

BetterSpawn Wiki edited this page Oct 21, 2026 · 1 revision

Building

Requirements

  • JDK 21
  • Gradle wrapper (included)

Build

./gradlew build

Output:

build/libs/betterspawn-1.0.0.jar

The project uses NeoForge ModDevGradle. The Gradle toolchain will resolve JDK 21 if the local JDK is missing.

Run

./gradlew runClient
./gradlew runServer

The default game directory is run/.

Running on a native filesystem

The project itself can live on any filesystem, but Minecraft region writes can fail on some FUSE/NTFS mounts with:

java.io.IOException: Value too large for defined data type
  at RegionFile.write(...)

Use a game directory on a native filesystem (for example btrfs/ext4):

cp -a run /home/<user>/BetterSpawn-run
./gradlew runClient -PgameDir=/home/<user>/BetterSpawn-run

-PgameDir applies to both runClient and runServer; the build output stays in the project directory.

If a copied world still fails on a specific region, back up the world and remove the affected region file (for example region/r.0.-1.mca). Only that region's chunks are affected.

Data generation

The MDK run config includes:

./gradlew runData

The generated resources go to src/generated/resources.

CI

The GitHub Actions workflow runs ./gradlew build on pushes and pull requests.

Clone this wiki locally