ModJarCache
The disk side of ModJarCollector: turns a code root with no file behind it into a repacked jar, and decides when that jar is stale.
Staleness is keyed on the CONTAINER jar, not on the mod version — a debug build that keeps its version number still moves the container's size|mtime.
Functions
The real on-disk jar behind root. A JiJ root nests UnionFileSystem ->jij: PathFileSystem -> UnionFileSystem -> real file; each layer names its backing path reflectively (loader classes, not on the common compile classpath).
cache jar name -> container stamp. One file, not a .stamp per jar: sidecars would go stale themselves, and nothing here deletes cache files.
Only what THIS run resolved, so a jar whose key moved on stops being reused. The file itself stays.
Copy one class file into jos as a STORED entry. Duplicate paths (a union/overlay FS can surface the same class twice) are dropped — putNextEntry would throw — and an unreadable file is skipped rather than failing the whole repack.