Commit Graph
35 Commits
Author SHA1 Message Date
xiaozhou233 8f314e1f5c Feat: Persist module settings to named config files
- Add ConfigManager, Config and ConfigSerializer with JSON storage,
  validated names, sorted listings and atomic temp-file writes
- Serialize module enabled state and typed values; ignore unknown or
  invalid entries so a malformed file cannot break a module
- Track dirty state from value and module changes, then save on GUI
  close and JVM shutdown instead of only when the GUI is closed
- Remember the last loaded config and refuse to delete the active one
- Snapshot in-memory state before loading and roll back on failure;
  back up unreadable files so the client still has a writable config
- Key modules by class name while still reading legacy display-name
  configs, so renaming a module keeps its stored settings
- Initialise the config manager during OrangeX startup
2026-11-10 20:53:48 +08:00
xiaozhou233 ed7fa13e7f Fix: Interpolate world positions with the frame's partial tick
- Pass the 1.8.9 HUD method's partial tick through the render hook into
  EventRender2D instead of reading Timer.renderPartialTicks reflectively
- Let WorldView.snapshot() take that value so ESP projection matches the
  rendered world and no longer advances in 20 Hz steps
- Keep the reflected timer read as a fallback and warn once when it cannot
  be resolved instead of silently interpolating with 0
2026-11-10 13:47:55 +08:00
xiaozhou233 d8a46a1b70 Feat: Show module settings as a page in the ClickGUI content area
- Replace the floating SettingsWindow with an inline settings page
- Return to the module list via the back button or a category click
- Scroll the module list and the settings page with the mouse wheel
- Share module row geometry through ContentList and add a scrollbar
  helper
- Bail out of scroll input when the content fits
2026-11-10 13:26:19 +08:00
xiaozhou233 09de736269 Feat: Add mouse wheel scrolling to client input
- Queue wheel notches in ClientInput for the next frame
- Forward wheel deltas from the 1.8.9 screen and 26.2 input screen
- Hook GuiScreen#handleMouseInput after vanilla, guarded so a
  missing method never disables the other input injections
- Shrink HUD module font size to 10
2026-11-10 13:12:22 +08:00
xiaozhou233 d9075831e3 Feat: Add entity kind and invisibility filters to ESP
- WorldView now captures every entity instead of players only and no longer applies gameplay filtering.

- Add EntityKind (player/monster/animal/villager/other) and local-player/invisible flags to EntityTarget.

- Move target filtering into ESP and add Players, Local Player, Monsters, Animals, Villagers, Others and Invisible options.

- Invisible entities are an independent filter and can be used as a standalone invisible-only ESP.
2026-11-09 15:38:48 +08:00
xiaozhou233 51a232d7ac Feat: Add 2D ESP module and cross-version world wrapper
- Add ESP render module drawing 2D boxes, corner brackets, fill, health
  bar, name and distance for nearby players.
- Add WorldView capability backed by per-version implementations:
  1.8.9 reconstructs the camera from renderViewEntity, Timer partial
  ticks and EntityRenderer#getFOVModifier, including third-person and
  front-view offsets; 26.2 reads GameRenderer#mainCamera directly.
- Add version-independent value objects (WorldSnapshot, EntityTarget,
  ScreenPoint) and Projection math shared by every version.
- Wire the new capability through WrapperProvider, WrapperRegistry and
  MinecraftFactory, and create the world view in OrangeX.start().
- Skip local, dead, invisible and spectator players, and drop targets
  behind the camera.

Verified with :OrangeX:shadowJar, mapping checks for both 1.8.9 mapping
files, member checks against the 1.8.8 obf jar, and fake-world tests for
both version implementations.
2026-11-08 18:11:11 +08:00
xiaozhou233 29eb7609e9 Feat: Add ClickGUI interface and stabilise 26.2 font rendering
- Split the window into style, layout, sidebar, content and settings renderers

- Remove the ACTIVE counter and footer hint; open module settings in a draggable popup on right click

- Use Montserrat for the ClickGUI and snap the window to whole pixels while dragging

- Fix 26.2 glyph snapping: shared baseline, thin-stroke visibility and even horizontal spacing
2026-11-08 15:24:42 +08:00
xiaozhou233 8183eae9d1 Fix: Restore correct rounded-rect corners on 26.2
- V26_2TextureHelper.create now takes raw RGBA again, so V26_2ShapeCache's quarter-circle corner textures are uploaded intact instead of being read as one-byte coverage and appearing grey

- Add an explicit createFromCoverage entry point for font atlases, which still expands directly into the NativeImage buffer

- Point V26_2FontBackend at createFromCoverage so the font texture optimisation is kept
2026-11-08 01:55:41 +08:00
xiaozhou233 6a045fd46f Perf: Reduce font atlas memory and bake cost
- Size atlases from the requested glyph set (Latin 512-2048, CJK 1024-4096) and double on overflow instead of always using a 4096x4096 sheet

- Share one atlas between logical sizes; CJK bake heights are bucketed (12-36px) so neighbouring sizes reuse the same Noto sheet

- Pack Latin at 2x2 and CJK at 1x1 oversampling in two stb passes; the context-wide 2x2 setting was quadrupling CJK atlases

- Budget font textures with -Dorangex.font.atlasBudgetMb (128 MB) using frame-pinned LRU eviction, plus idle release (-Dorangex.font.idleSeconds, 30s) and face cleanup

- Upload 1.8.9 atlases as GL_LUMINANCE_ALPHA with premultiplied glyph blending (2 bytes per texel) and restore the previous blend function after a frame

- Write 26.2 RGBA pixels straight into the NativeImage buffer instead of building a second full-size array

- Move the string width cache into FontFace so it survives across frames, and hoist HUD getFont calls out of the render loops
2026-11-08 01:50:22 +08:00
xiaozhou233 524d540c1a Feat: Add Jello and Montserrat font families
- Register Jello Light/Regular/Medium and Montserrat Light/Regular/Medium/Bold, with weights lacking a bold file reusing a heavier face

- Add Render2D.getFont(FontFamily, size[, bold]) so features can pick a family, implemented by both the 1.8.9 and 26.2 backends

- Allow overriding the default family with -Dorangex.font.family (display name, constant name or font file name); Proxima stays the fallback

- Resolve CJK glyphs missing from the new Latin-only faces through the existing Noto fallback
2026-11-08 01:24:29 +08:00
xiaozhou233 5f3721c294 Feat: Add ClickGUI module bound to RSHIFT
- Add modules/impl/render/ClickGUI with default keybind RSHIFT

- Let the module open/close the input screen via requestOpen/requestClose

- Sync module state when the screen is closed by vanilla handling

- Remove the hard-coded GUI toggle from ClientInput/InputController
2026-11-08 00:50:05 +08:00
xiaozhou233 f6d8c7da2f Feat: Add module value system
- Add Value, BooleanValue, KeybindValue and ModeValue

- Store values per module with defaults, reset, visibility and JSON encoding

- Wire module keybinds to EventKey so bound keys toggle modules
2026-11-07 18:58:04 +08:00
xiaozhou233 7e27752ffc Feat: HUD Module 2026-11-07 18:45:52 +08:00
xiaozhou233 c8e23c5d1c Build: Keep Java 8 output while compiling 26.2 sources
- Compile main sources with --release 8

- Move record-dependent v26_2 input classes to a separate source set

- Use a JDK 25 toolchain for that source set, still emitting class version 52

- Fix the Injector PrintStream charset constructor for Java 8
2026-11-07 17:01:36 +08:00
xiaozhou233 a84b04877d Refactor: Route key input through EventBus
- Post EventKey from 1.8.9 KeyBinding/GuiScreen hooks

- Hook 26.2 KeyboardHandler#keyPress so keys fire while walking

- Normalize 26.2 GLFW key codes to 1.8.9 LWJGL 2 codes

- Drive the GUI toggle from InputController instead of tick polling
2026-11-07 16:48:26 +08:00
xiaozhou233 70d8a854ea Feat: Auto download client jar and dependence 2026-11-07 15:46:11 +08:00
xiaozhou233 fea7089ff8 Feat: Upgrade to Java25 gradle-9.8.2, Delete Stubs 2026-11-07 15:11:18 +08:00
xiaozhou233 4b55871a8b Fix: Resolve hooks on launchers with remapped class loaders
Inject through the top-level orangexbridge package instead of imported cn.* names, build a fresh Javassist pool with agent-provided runtime class bytes, and fall back to safe class paths. Fixes Lunar GenesisClassLoader hook failures where resource class files still use obfuscated names.
2026-11-07 13:51:57 +08:00
xiaozhou233 cfb0ba4a48 Feat: Add world-only rendering and empty input GUI
Gate EventRender2D on shouldRenderLevel; add cross-version empty input screens toggled with M (1.8.9 generated GuiScreen subclass, 26.2 Screen), ClientInput state and debug overlay; add 26.2 compile stubs; move LWJGL2 jar to libraries.
2026-11-07 13:34:52 +08:00
xiaozhou233 715cb0755f Feat: Add 2D GUI shape rendering
- Extend Render2D with rect, gradient, outline, rounded rect, line and scissor primitives\n- Add shared 1.8.9 fixed-function render state for shapes and glyphs\n- Render 1.8.9 rounded rects with triangle fans and framebuffer scissor\n- Submit 26.2 shapes through GuiGraphicsExtractor fill/fillGradient/scissor\n- Assemble 26.2 rounded corners from cached quarter-circle textures\n- Add GUI rendering documentation and extend the debug overlay
2026-11-05 21:28:21 +08:00
xiaozhou233 b9ac9d5a92 Refactor: Clean up font rendering diagnostics
- Remove one-time hook/texture/glyph debug logs\n- Reuse one legacy glyph drawer instead of allocating it per frame\n- Make the font debug overlay opt-in via -Dorangex.debugFont=true\n- Update font port documentation
2026-11-05 20:56:49 +08:00
xiaozhou233 b909a01fe0 Fix: Enable font debug overlay by default
Forgot -Dorangex.debugFont on Forge/Vanilla launchers left the Render2D event without subscribers. Keep the overlay on by default during the porting phase; disable with -Dorangex.debugFont=false.
2026-11-05 20:45:19 +08:00
xiaozhou233 867949967e Fix: Locate Forge GuiIngameForge HUD method by descriptor
Forge 1.8.9 remaps the HUD override to a name that differs between the universal jar (a), SRG runtime (func_175180_a) and MCP (renderGameOverlay). Find the single instance (F)V method instead of hardcoding renderGameOverlay.
2026-11-05 20:42:44 +08:00
xiaozhou233 c8fa1a4c64 Fix: Shade javassist into OrangeX namespace for Forge
Forge 1.8.9's LaunchClassLoader delegates the javassist package to its parent, so the injected jar's unrelocated javassist classes were never found. Relocate javassist.* to cn.xiaozhou233.orangex.shaded.javassist.* so the hook system is self-contained.
2026-11-05 20:34:53 +08:00
xiaozhou233 c3dab97779 Feat: Add cross-version TTF font rendering
- Port stb_truetype rasterizer and bake TTF glyph atlases\n- Add FontRenderer/Render2D API with section colors, shadows and CJK fallback\n- Add 1.8.9 GL11 backend and 26.2 GuiRenderState backend\n- Hook GuiIngame/GuiIngameForge and Gui#extractRenderState for per-frame 2D\n- Bundle Proxima, Noto and Poppins fonts\n- Add render/font documentation
2026-11-05 20:31:32 +08:00
xiaozhou233 6c19985e52 Feat: Add tick hooks and Fabric 26.2 support
- Add ClassHook/HookManager pipeline that patches classes through
  JuiceAgent retransform
- Fire EventTickPre/EventTickPost around Minecraft.runTick
  (1.8.9: runTick()V, 26.2: runTick(Z)V)
- Prepare the javassist ClassPool with OrangeX.jar and imported
  packages, avoiding the vanilla 1.8.8 default-package "cn" class
  collision on qualified names
- Access the JuiceAgent API through the system ClassLoader so
  Fabric's Knot does not load a second copy without native methods
- Document the hook architecture, event bus and troubleshooting
  under docs/
2026-11-05 14:27:31 +08:00
xiaozhou233 40ca99f853 Feat: Support Fabric 26.2 injection
- Expose OrangeX.jar through KnotClassDelegate.addCodeSource for Fabric
- Resolve 26.2 mappings by runtime class visibility instead of loader type
- Keep identity mappings for the current Mojang-named Fabric 26.2 runtime
2026-11-04 23:06:22 +08:00
xiaozhou233 1699df9c5d Feat: Add Minecraft 26.2 wrapper support
- Implement the 26.2 Minecraft wrapper using the private instance field
- Register the 26.2 provider and use identity mappings for Mojang names
- Fix MappingManager fallthrough for the 26.2 case
- Accept Render thread and resolve the game class loader by class visibility
2026-11-04 22:57:15 +08:00
xiaozhou233 0f2d9614e5 Fix: Convert mapping class names to binary names
Mapping files store internal names such as net/minecraft/client/Minecraft, but Class.forName requires binary names. Vanilla worked because its target class name has no slashes; Forge failed with ClassNotFoundException.
2026-11-04 22:37:57 +08:00
xiaozhou233 13c9bb622c Refactor: Add version provider registry to wrapper
- Add WrapperContext, WrapperProvider and WrapperRegistry for version dispatch
- Move the 1.8.9 implementation to internal.v1_8_9 with constructor injection
- Support identity mappings for MCP development environments
- Document the wrapper structure and how to add a Minecraft version
2026-11-04 22:21:55 +08:00
xiaozhou233 8b9dbce0f7 Refactor: Make runtime detection extensible and Java 8 compatible
Split the runtime package into small, single-purpose pieces so new loaders and Minecraft versions can be added by registration instead of editing control flow.

- Add LoaderProbe registry for mod loader detection

- Add VersionSignatureRegistry/VersionSignature and move structural version signatures out of VersionDetector

- Add VersionIdSource list for Forge/NeoForge metadata readers

- Extract ModernVersionDetector and CandidateClassLoaders

- Replace MinecraftVersion's mutable static id with RuntimeInfo.versionId

- Target Java 8 with source/target 1.8 and --release 8 on JDK 9+

- Add docs/adding-minecraft-versions.md
2026-11-04 01:04:50 +08:00
xiaozhou233 789303c665 Refactor: Move Minecraft runtime detection into OrangeX
Move the full runtime package from Loader to OrangeX (cn.xiaozhou233.orangex.runtime), including loader/version detection, probes and utils.

- OrangeX.start() now detects and stores RuntimeInfo, and prints runtime debug info

- Loader keeps only a self-contained GameClassLoaderResolver for bootstrapping the Minecraft ClassLoader; entry flow is otherwise unchanged

- Move gson dependency to OrangeX with shadow relocation; drop it from Loader
2026-11-04 00:45:58 +08:00
xiaozhou233 fc7a26f051 Feat: Add Minecraft 1.8.8 client module
- Register Minecraft1.8.8 in settings.gradle and .idea/gradle.xml
- Link Minecraft1.8.8 against the 1.8.8 jar, runtime libraries and Loader
- Ignore decompiled src/ and runtime/ directories
- Add start/stop hooks to OrangeX entry point
- Add shared run configurations for packageAll and Start Client
- Drop unused JUnit test blocks from Loader and OrangeX
2026-10-24 16:44:01 +08:00
xiaozhou233 7c644e4d63 Build: Package shaded jars into out/tmp
- Add root packageAll task aggregating Loader and OrangeX shadow jars
- Add cleanOut task so stale artifacts are removed before packaging
- Output fixed-name Loader.jar and OrangeX.jar into out/tmp
- Switch OrangeX Lombok to compileOnly so it is not shaded
2026-10-24 14:01:21 +08:00
xiaozhou233 a7537e9d98 Feat: Add OrangeX core module
- Register OrangeX subproject in settings.gradle
- Add OrangeX build.gradle with Lombok support
- Add OrangeX singleton entry class
2026-10-24 13:54:36 +08:00