fix: handle unobfuscated Minecraft versions (26.1+)#4
fix: handle unobfuscated Minecraft versions (26.1+)#4GhostTypes merged 4 commits intoMCDxAI:mainfrom
Conversation
Mojang stopped obfuscating the client JAR starting with 26.1 snapshots. These versions have no `client_mappings` in their version JSON, so there are no intermediary mappings and remapping is unnecessary. - Add `VersionManager.isVersionUnobfuscated()` — detects unobfuscated versions by checking for the absence of `client_mappings` in the Mojang version JSON - In `RemapService.doGetRemappedJar()`, skip remapping entirely for unobfuscated versions when `mojmap` is requested (raw JAR is already in Mojang's human-readable names); throw a clear actionable error for `yarn`/`intermediary` which have no applicable mappings - Add tests: `isVersionUnobfuscated` for both obfuscated and 26.1+ versions, and remap error/success paths for unobfuscated versions
Summary of ChangesHello @Indemnity83, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces crucial support for recent Minecraft versions (26.1+) that are shipped without obfuscation. It enhances the remapping service to intelligently detect these unobfuscated JARs, allowing for direct use with Mojang mappings while preventing incorrect attempts to apply Yarn or Intermediary mappings, thereby improving robustness and user experience for newer game clients. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for unobfuscated Minecraft versions (26.1+), which is a great enhancement. The changes correctly detect these versions by checking for the absence of client_mappings and adjust the remapping logic accordingly: skipping remapping for mojmap and throwing errors for unsupported mapping types. The new logic is well-covered by tests.
I've identified a couple of areas for improvement: one related to performance due to redundant network requests, and another concerning code duplication in the test files. My detailed comments are below.
…E2E coverage - fail fast for unsupported mappings on unobfuscated versions before JAR download - cache Mojang version JSON requests with retry-safe cache eviction on failure - centralize unobfuscated test version constants - add downloader/remap unit regressions for caching and unobfuscated remap behavior - add MCP handler regression for unobfuscated yarn decompile error guidance - add true stdio MCP server smoke tests (tools/resources + unobfuscated paths) - add manual stdio MCP matrix tests for 1.21.11/1.21.10/1.20.1/1.19.4 and unobfuscated snapshots 26.1-snapshot-1/8/9 - add npm scripts and manual test docs for MCP transport matrix runs
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0c3bb662b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…etection - Move __tests__/mcp/stdio-server-smoke.test.ts into __tests__/manual/mcp/ so heavy decompile-on-first-run tests are excluded from the default npm test run; remove the now-redundant test:mcp:e2e script - Fix misleading timeout comment on the unobfuscated-yarn throw test (throws before any JAR download, only needs a version JSON fetch) - Add UNOBFUSCATED_VERSION_OVERRIDES escape hatch in VersionManager for future Mojang metadata anomalies - Simplify isVersionUnobfuscated to time-gate only; drop the redundant version-id regex guard (client_mappings check + cutoff is sufficient) - Extend version-manager tests to cover the exact 26.1-snapshot-1 boundary and a newer snapshot (26.1-snapshot-9) - Refactor stdio-matrix test constants to a flat version list; classify obfuscated vs unobfuscated at runtime via isVersionUnobfuscated() rather than a hardcoded version-id pattern
Summary
Changes
client_mappingsin the version JSON.mojmapand return the raw client JAR directly.yarnorintermediarymappings are requested for unobfuscated versions.Notes
mojmap,yarn, andintermediary.