Skip to content

Comments

fix: handle unobfuscated Minecraft versions (26.1+)#4

Merged
GhostTypes merged 4 commits intoMCDxAI:mainfrom
Indemnity83:fix/unobfuscated-version-support
Feb 21, 2026
Merged

fix: handle unobfuscated Minecraft versions (26.1+)#4
GhostTypes merged 4 commits intoMCDxAI:mainfrom
Indemnity83:fix/unobfuscated-version-support

Conversation

@Indemnity83
Copy link
Contributor

Summary

  • Add support for Minecraft 26.1+ snapshots that ship with unobfuscated client JARs.

Changes

  • Detect unobfuscated versions by checking for missing client_mappings in the version JSON.
  • Skip remapping for unobfuscated versions when using mojmap and return the raw client JAR directly.
  • Fail fast with clear errors when yarn or intermediary mappings are requested for unobfuscated versions.

Notes

  • Adds test coverage for unobfuscated version detection and remap behavior across mojmap, yarn, and intermediary.

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
@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Unobfuscated Version Support: Added support for Minecraft 26.1+ snapshots that ship with unobfuscated client JARs, ensuring compatibility with newer game versions.
  • Unobfuscated Version Detection: Implemented a mechanism to detect unobfuscated versions by checking for the absence of 'client_mappings' in the version JSON.
  • Remapping Behavior: Modified the remapping process to skip remapping for unobfuscated versions when 'mojmap' is requested, directly returning the raw client JAR.
  • Error Handling: Introduced specific error messages when 'yarn' or 'intermediary' mappings are requested for unobfuscated versions, guiding users to use 'mojmap'.

🧠 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
  • tests/core/remap-service.test.ts
    • Added new test suite for unobfuscated version handling.
    • Included tests to verify error throwing for 'yarn' and 'intermediary' mappings on unobfuscated versions.
    • Added a test to confirm the raw client JAR is returned for 'mojmap' on unobfuscated versions.
  • tests/core/version-manager.test.ts
    • Added new test suite for unobfuscated version detection.
    • Included tests to verify 'isVersionUnobfuscated' returns correct boolean values for both obfuscated and unobfuscated versions.
  • src/services/remap-service.ts
    • Integrated a check for unobfuscated versions at the beginning of the 'getRemappedJar' method.
    • Implemented conditional logic to throw errors if 'yarn' or 'intermediary' mappings are requested for unobfuscated versions.
    • Added logic to return the raw input JAR directly when 'mojmap' is requested for unobfuscated versions.
  • src/services/version-manager.ts
    • Added a new asynchronous method 'isVersionUnobfuscated' to determine if a given Minecraft version's JAR is unobfuscated by checking for the presence of 'client_mappings' in its version JSON.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@GhostTypes GhostTypes self-assigned this Feb 20, 2026
…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
@GhostTypes GhostTypes added the enhancement New feature or request label Feb 21, 2026
@GhostTypes
Copy link
Contributor

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
@GhostTypes GhostTypes merged commit cf44fb7 into MCDxAI:main Feb 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants