Files
OpenPrestige/injector/README.md
T
aidanandClaude Opus 5.5 05d169a2dd Sync local working tree: injector, engine, mixin and build updates
Add compatibility notes, resource-provider and hook checks, and payload
bundling script. Remove generated engine mixin stubs, engine target lists
and prebuilt binaries now produced by the build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 17:27:24 -06:00

4.6 KiB

OpenPrestige offline injector

This repository contains the original CLI injector, native library with embedded payload and game sources. The graphical launcher and runtime downloader are maintained in the separate Prestige repository. There is no GUI or HTTP dependency in this injector and no edition build flag.

Build

Run build-injector.ps1 on Windows or build-injector.sh on Linux/macOS. Both build the Fabric JAR, then the native library and CLI, collecting the results and a host ZIP in dist/. Stonecutter compiles every target from 1.21.1 through 1.21.11. bundlePayloads requires every variant to build and pass access-widener and hook checks before splitting the JARs into build/bundle/common.jar and eleven exact-version payloads. The native library embeds those files, sharing byte-identical libraries and assets once. Versioned game classes, hooks, mappings, and metadata stay in each payload. Standalone Fabric mods are available in versions/<minecraft>/build/libs/.

Run build-release.bat on Windows to build all platforms. dist/release/ contains:

openprestige-<version>-windows-x86_64.zip
openprestige-<version>-windows-aarch64.zip
openprestige-<version>-linux-x86_64.zip
openprestige-<version>-linux-aarch64.zip
openprestige-<version>-macos-universal.zip
SHA256SUMS.txt

Each ZIP contains OpenPrestigeInjector (or .exe), the native library, and a README. The CI injector workflow builds only OpenPrestige. Build dependencies require internet access; the resulting release bundle needs no runtime downloads.

Use

Extract the complete platform ZIP, start Minecraft, then run:

OpenPrestigeInjector                  # Up/Down selects, Enter injects, Esc quits
OpenPrestigeInjector <pid> [lib path] # optional explicit library path

Keep the native library beside the executable. The CLI uses that library and never looks in Prestige's downloaded runtime cache. It has no update checks or --download command. The library reads Fabric metadata, rejects unsupported targets, then extracts the shared JAR and only the matching version payload so the JVM can load them. No external JAR is needed for injection. Linux/macOS require a terminal, the same user as the game, and JVM attach enabled.

Platforms and requirements

Windows and Linux support x86_64 and ARM64. macOS supports Intel and Apple Silicon. The injector, library and JVM architectures must match. ARM64 execution needs hardware testing. The game code targets Minecraft 1.21.1 through 1.21.11 Fabric, Fabric Loader 0.19+ and a Fabric API build matching the game. Spear modules are included only on 1.21.11.

Build tools require Rust, Python 3 and JDK 21. On Windows, the full release build also requires MSVC build tools for x64 and ARM64. build-release.bat fetches pinned ImGui sources and builds the small JNI libraries before building the remapped JAR. It installs Zig and cargo-zigbuild if needed, then cross-compiles Linux x64/ARM64 and universal macOS.

Both repositories currently start from the same game sources and use the compatible .openprestige configuration and log locations. They are independent repositories, without submodules, shared working files or edition build flags. Game code fixes must be ported between repositories explicitly.

User data

OS Location
Windows %APPDATA%\.openprestige
macOS ~/Library/Application Support/.openprestige
Linux $XDG_DATA_HOME/.openprestige or ~/.local/share/.openprestige

Configs live in configs/, logs in logs/, and local runtime files in runtime/.

Developer checks

./gradlew validateHooks
python check/bundle_payloads_check.py
python scripts/test_release.py
./gradlew -I check/resource-provider.gradle :1.21.11:resourceProviderCheck

validateHooks checks target classes, shadow fields, method selectors, callback parameters, and invocation targets against each version's mapped game bytecode. Engine anchor classes and target lists are generated from compiled transformer annotations and that version's Yarn mappings.

Normal Cargo builds require the complete build/bundle directory. Set PRESTIGE_BUNDLE to use a different complete bundle directory. An explicit PRESTIGE_PAYLOAD=<fat-remapped.jar> remains available for single-target developer builds, with the Java exact-target guard retained. There is no newest-JAR fallback.

Windows-only native loading smoke tests can use the existing engine command file with loadnative <absolute DLL path>, followed by wait 40 and exit. In a dev client already running Prestige as a Fabric mod, bootstrap skips installing a second set of hooks. This exercises native metadata lookup and payload selection.