17 Commits
Author SHA1 Message Date
xiaozhou233 4effbc36f5 Docs: Add development guides for modules and wrappers
- Add docs/README.md with the documentation index, reading order and
  layer responsibilities
- Add adding-modules.md covering module registration, lifecycle, events,
  Value settings, config persistence and the NoJumpDelay example
- Add reflection-and-mappings.md covering MCP/SRG names, MappingResolver,
  ReflectionSupport and the common reflection pitfalls
- Add adding-wrapper-capabilities.md walking through a new Player wrapper
  from API to module usage, with NoJumpDelay as the worked example
- Update adding-wrapper-versions.md to match the real createPlayer
  signature, the current directory layout and the provider checklist
- Link the development docs from README.md
2026-11-10 22:00:15 +08:00
xiaozhou233 30fde895b6 Docs: README.md 2026-11-10 15:00:21 +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 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 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 0599e48ebe Docs: world-gating-and-input.md 2026-11-07 14:52:28 +08:00
xiaozhou233 5c726f54e4 Docs: Add launcher class-loader troubleshooting and hook file index 2026-11-07 13:55:05 +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 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 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