Repository navigation
feat: add Forge/NeoForge patched-source tools (Phase 4) - #18
Merged
GhostTypes merged 2 commits intoOct 20, 2026
Merged
Conversation
Seven MCP tools that build and serve the Minecraft source as modified by Forge/NeoForge (loader sources included, mojmap-only), fetched automatically via NeoFormRuntime instead of requiring a hand-built patched JAR: - list_forge_versions / decompile_forge_minecraft_version (substantive) - get_forge_source / get_forge_minecraft_source / search_forge_code / search_forge_minecraft_code / compare_vanilla_vs_forge (thin wrappers over the existing patched-key machinery, lazy-built on first use) Pipeline: forge-maven.ts resolves loader versions from the loader Mavens (recommended builds via promotions_slim, NeoForge -beta markers, 24h in-process TTL) -> nfrt.ts wraps neoform-runtime 2.0.31 (downloaded lazily; --dist joined --neoforge <gav>:userdev, works for Forge via --add-repository) requesting gameSourcesWithNeoForge + gameJarWithNeoForge -> forge-source-service.ts feeds them to the existing decompileLocalJar (direct extraction) and registerAsRemappedJar (keeps AT validation working). The tree lands under the same opaque <mc>-<loader>-<ver> key, so every vanilla tool reads it unchanged. NFRT artifacts are cached so force rebuilds in seconds. Robustness: extractSourcesJar now stages into a sibling dir and swaps atomically (a killed extraction can no longer leave a partial tree that reads as a warm cache), NFRT failures delete truncated result files, and cached reads with an explicit loader version skip version metadata entirely (works offline). Tool count 21 -> 28; docs, skills, CLAUDE.md, AGENTS.md and CHANGELOG updated. Verified: 609/609 default suite tests, manual E2E 5/5 for both NeoForge 1.21.1 and Forge 1.20.1 (incl. first in-repo NFRT-forge run).
The design rationale lives in CLAUDE.md (Phase 4 tool notes) and the CHANGELOG entry; raw planning documents don't belong in the package.
Contributor
|
Sorry for the late reply and thank you for your work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Seven MCP tools that build and serve the Minecraft source as modified by Forge/NeoForge (loader sources included, mojmap-only), fetched automatically via NeoFormRuntime — no more hand-built patched JARs:
Substantive:
list_forge_versions,decompile_forge_minecraft_versionThin wrappers (lazy-built):
get_forge_source,get_forge_minecraft_source,search_forge_code,search_forge_minecraft_code,compare_vanilla_vs_forgeHow
forge-maven.ts— loader versions from the loader Mavens (recommended builds via promotions_slim, NeoForge-betamarkers, 24h in-process TTL)nfrt.ts— wrapsneoform-runtime2.0.31 (lazily downloaded):--dist joined --neoforge <gav>:userdev, requestinggameSourcesWithNeoForge(merged MC+loader sources) +gameJarWithNeoForgeforge-source-service.ts— feeds both into the existingdecompileLocalJar(direct extraction) +registerAsRemappedJar(AT validation keeps working). The tree lands under the existing opaque<mc>-<loader>-<ver>key, so every vanilla tool reads it unchangedRobustness
extractSourcesJarnow stages + swaps atomically — a killed extraction can no longer leave a partial tree that reads as a warm cacheloaderVersionskip version metadata entirely (offline-friendly)Testing
npm run test:manual:forge, env-gated): NeoForge 1.21.1 5/5, Forge 1.20.1 5/5 — patchedLivingEntityverified to contain theForgeHooks.onLivingHurtinjection