Prestige injector (Rust)
PrestigeInjector.exe loads prestige_native.dll into a running Minecraft 1.21.11 Fabric JVM (64-bit, Fabric Loader 0.19.x,
Fabric API installed). It uses the same overall method as the openvape bundle, written from scratch in Rust with no external crates.
How it works
- Injector lists visible
java.exe/javaw.exewindows (refreshed every 750 ms), then runsLoadLibraryWin the chosen process throughCreateRemoteThreadand confirms the module is mapped. prestige_native.dll(DllMainonly spawns a worker thread):- waits for
jvm.dll,JNI_GetCreatedJavaVMs, attaches, acquires the JVMTI redefine/retransform capabilities; - writes the embedded payload jar (the remapped
prestige-*.jar) to%TEMP%\PrestigeLoader; FabricLauncherBase.getLauncher().addToClassPath(jar)so payload and game classes share the Knot class loader;- registers
NativeBridge.classBytes/NativeBridge.redefineand callsBootstrap.start().
- waits for
Bootstrap(Java) waits for the client window, then for every ClassTransform hook target gets the current class bytes (JVMTI retransform capture), runs the hooks throughInPlaceTransformerand redefines the class. The bundled ClassTransform inlines hook handlers into the target methods, so normally nothing is added to the class and a plain redefine works. If a transformer ever does add methods (a running JVM cannot), they are moved into generateddev.zprestige.prestige.hooks.H*helper classes, call sites becomeinvokestatic, and private member access goes throughAccessMethodHandles. Finally the Prestige and ClickGUI entrypoints run on the client thread.
Log: prestige-native.log beside the DLL, plus [Prestige-Inject] lines in the game log.
Build
.\build-injector.ps1 # gradlew remapJar, cargo build --release, copies to dist\
Use
Start a Fabric 1.21.11 instance, then run dist\PrestigeInjector.exe (or PrestigeInjector.exe <pid> [dll]).