Skip to content

romeoahmed/alumite

Repository files navigation

Alumite

Server-side performance mod for Minecraft 26.2 (Fabric Loader 0.19.3, JDK 25).

The first feature, Reheat, is a content-addressed, mmap-backed cache that short-circuits RecipeManager.prepare on warm boots of an unchanged recipe set:

  • Cold boot: vanilla path runs, the result is encoded through Recipe.CODEC / NbtOps and written atomically to <world>/data/alumite-reheat/recipes.almr on a virtual thread.
  • Warm boot: the SHA-256 content key over the live recipe JSON set is recomputed, the cache header is gated on (content key + capability digest + CRC32C body checksum), the payload is decoded directly from the Arena.global() mapping.
  • First warm boot after a fresh write: a verifier reruns vanilla prepare on a virtual thread and Merkle-compares; match flips the verified flag in place, mismatch invalidates.

Vanilla benchmark on MC 26.2 (1585 recipes): cold p50 24.6 ms → warm p50 8.7 ms = 2.84× (RecipeManagerPrepareBench).

Build and run

./gradlew build         # remapped jar in build/libs/
./gradlew runServer     # dev dedicated server (loads the mod from src/)
./gradlew runClient     # dev client (integrated server hosts the cache)
./gradlew test          # unit + bootstrap-driven integration tests
./gradlew genSources    # decompile Minecraft for IDE navigation

Project-wide conventions and the lifecycle / mixin layout live in CLAUDE.md; design rationale, source citations, and the acceptance criteria for v0.1 live under docs/.

Operator commands

Permission LEVEL_GAMEMASTERS (ops level 2):

/alumite reheat status       hit|miss, verified bit, key prefix, type count, entry count
/alumite reheat invalidate   delete the active world's cache file
/alumite reheat verify       run the Merkle equivalence check synchronously (≤30 s)

JVM flags

-Dalumite.reheat.disabled=true        skip cache reads and writes entirely
-Dalumite.reheat.verify=always        verify on every hit (CI / paranoid)
-Dalumite.reheat.verify=never         skip first-warm-boot verify (not for production)

Benchmarking against a real pack

bash scripts/bench-reheat.sh          # two consecutive runServer boots; prints cold/warm/speedup

Pack composition rules (≥200 mods, ≥3 mod-added recipe serializers) are in docs/specs/reheat-bench-pack.md.

License

CC0-1.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages