add java client source

This commit is contained in:
st committed 2026-11-09 21:22:29 -06:00
commit c7a15fdc7d
98 files changed
+80145

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# amnesia for java 1.21.1
A separate Windows x64 DLL for the running Java Edition client. Java uses Bedrock's Dear ImGui views for ClickGUI, the account dialog, the intro and the music HUD. It also shares the Verdana/FreeType font system, widgets, theme controls, watermark, keystrokes and notifications. The Java bridge resolves Minecraft classes through the running JVM with bindings generated for 1.21.1. It supports the vanilla obfuscated names and NeoForge's Mojang names.
## use
1. Open Minecraft Java 1.21.1.
2. Run `amnesia-java-loader.exe` from the directory containing `amnesia-java.dll`. If multiple supported game windows are open, pass `--pid <pid>`.
3. Sign in with your existing amnesia account after the intro. The default API is `http://127.0.0.1:8787/api`. Expand **connection** on the login screen to use your HTTPS API.
4. Press **Right Shift** to open ClickGUI. Left-click module rows to toggle them and right-click to expand settings. The **hud editor** button opens the drag-and-grid editor. **Themes** and **Profiles** are in the utility panel.
The Java profiles live in `%LOCALAPPDATA%\amnesia\java`. For an isolated profile, set `AMNESIA_JAVA_PROFILE_DIR` to an absolute path before launching the game. Remembered sign-in uses a separate Windows Credential Manager entry for each overridden profile directory. Startup and compatibility diagnostics are written to `amnesia-java.log` beside the DLL.
To detach while the game is rendering, run `amnesia-java-loader.exe --detach`. The DLL stays resident to keep in-flight native callbacks safe. Restart Minecraft before attaching again or replacing that copy of the DLL.
## features
- HUD widgets for FPS, keystrokes, CPS, coordinates, time, speed, XP, armor, held items, effects, crosshair target, entity counts, tab list, player radar, active modules, compass, session stats, and diagnostics.
- Target HUD for mobs and players, with eased tracking, a two-second linger, and native skin portraits for players.
- Waypoints, breadcrumbs, tracers, logout spots, projectile previews, loaded-chunk fortress scans, positional sound markers, and a friend locator gated by Java's Realms connection type.
- FOV, hold-C zoom, fullbright, custom crosshair, block outlines, rain and thunder strength, local sky time and name, third-person freelook, particle reduction, and entity distance scaling.
- Custom chat on **T**, notification cards, durability alerts, inventory quick transfers with a name filter, tool and weapon selection, sprint, Enderman look-away, hold-to-click, mob-only attacks, and idle swings.
- Windows media controls, artwork, playback progress, and direct LRCLIB lookup for synced lyrics.
The fortress scan searches loaded terrain for Nether-brick clusters and can find player-built structures. Java projectile previews use approximate block collisions and launch speeds. Chat opens with T or slash and uses Java's plain message text. The custom crosshair and block outline draw over the corresponding vanilla elements. Inventory tools have in-container steal and dump buttons with a right-click item picker and a stop button during transfers. Sorting is unavailable. The weather module uses Java's native rain and thunder.
Bedrock's viewmodel and glint edits, villager macro, Auto Tree, Bridge Assist and custom weather shaders are outside this build. Java has no matching vanilla coordinates overlay. Module settings and HUD data are limited to what the Java bridge provides. Other loaders and Minecraft versions need their own bindings and verification.
## build
Install Visual Studio 2022 with Desktop development with C++, Windows SDK 10.0.26100, CMake, Python 3, and a 64-bit JDK. From this directory, set `JAVA_HOME` to the JDK and run:
```powershell
./tools/fetch-mappings.ps1
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --parallel
ctest --test-dir build -C Release --output-on-failure
```
The loader and DLL go in `build/Release`. The mappings and test game files stay under the ignored build directory.