Files
Matt Sijbers 372b5090cd Build-Tweaks: validate every jar before declaring success
Adds three structural assertions that run after the zip is built:

1. No backslash separators in any entry name. NeoForge needs
   "META-INF/neoforge.mods.toml" to be at exactly that forward-slash
   path; PowerShell 5.1's [ZipFile]::CreateFromDirectory() puts
   "META-INF\neoforge.mods.toml" instead, which the loader silently
   rejects. The current build code uses CreateEntry with explicit
   forward slashes, but this guard fires if anyone reverts to the
   simpler-looking CreateFromDirectory.

2. META-INF/neoforge.mods.toml exists at the canonical path. Without
   it, NeoForge skips the jar with a bland "not a valid mod file"
   warning that's easy to miss in a 500-line game log.

3. The modId declared in the embedded TOML matches the source folder's
   modId. Catches the case where a tweak folder is renamed but its
   neoforge.mods.toml isn't updated, which would otherwise ship a jar
   whose declared identity differs from its filename.

Each tweak jar's build line now tags "[validated]" so a casual reader
of the log sees that the post-build checks ran. Failure raises a
specific exception with the offending entries listed, so the build
fails loudly at the source instead of producing a pack that mysteriously
doesn't apply its tweaks at runtime.
2026-05-09 22:33:52 +01:00
..