You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,25 @@ Tests the entire pipeline end-to-end:
208
208
npm test# Runs all integration tests
209
209
```
210
210
211
+
### Patched-JAR Suite (`__tests__/manual/patched/`)
212
+
213
+
Env-driven E2E suite that exercises the full patched-MC pipeline (decompile/extract → get_minecraft_source → search → index → vanilla-vs-patched compare → force re-run). Skips cleanly when `PATCHED_JAR_PATH` is unset.
214
+
215
+
CI generates real patched JARs via `.github/workflows/patched-jars.yml`:
216
+
- NeoForge matrix (1.20.4, 1.21.1, 1.21.4) via NeoFormRuntime (`nfrt run --dist joined --neoforge ...:userdev`)
217
+
- Forge 1.20.1 via a tiny ForgeGradle 6 fixture project (`gradle eclipse` triggers lazy materialization — FG6 has no equivalent of FG5's `setupDecompWorkspace`)
218
+
219
+
Triggered on `workflow_dispatch` and on main pushes that touch the patched-JAR surface. Out of default PR CI to keep it fast.
220
+
221
+
Local run against your own JAR:
222
+
```bash
223
+
PATCHED_JAR_PATH=/path/to/patched.jar \
224
+
PATCHED_VERSION=1.21.1-neoforge-21.1.72 \
225
+
PATCHED_MC_VERSION=1.21.1 \
226
+
PATCHED_LOADER=neoforge \
227
+
npm run test:manual:patched
228
+
```
229
+
211
230
## Common Tasks
212
231
213
232
### Adding Support for a New Mapping Type
@@ -270,6 +289,12 @@ The code should work automatically, but be aware:
270
289
- Compact and efficient
271
290
- Well-supported by tools
272
291
292
+
### Patched MC JARs (Forge/NeoForge) — opaque version key
293
+
For `decompile_minecraft_version` with `jarPath`, the `version` parameter is treated as an opaque cache-key string (convention: `<mc>-<loader>-<loaderVersion>`). No parsing — the same key flows unchanged through `getDecompiledPath`, the cache DB, the FTS5 index, and every downstream tool. This is why patched MC slots into the existing `decompiled/{version}/{mapping}/` layout with zero new code paths in search/index/compare. `find_mapping` is the one exception: it strips the loader suffix via `stripPatchedVersion` so tinyfile lookups still resolve to the vanilla MC's mapping data.
0 commit comments