Build-Pack: default tweak jars to side=server, 0.22.2 -> 0.22.3

URGENT client-side fix. brassandsigil_tweaks-1.0.0.jar (built from
pack/tweaks/ into pack/overrides/mods/) declares lithostitched as a
hard dependency in its mods.toml. lithostitched is tagged side=server
in the lockfile because it's worldgen-only. brassandsigil_tweaks had
no explicit side tag so Build-Pack defaulted it to side=both. Clients
downloaded the tweak jar but not the dep -> NeoForge refused to start
with 'Mod brassandsigil_tweaks requires lithostitched 1.7 or above'.

Fix: Build-Pack now injects side='server' on any local-override file
under mods/. All tweak jars are data-only (worldgen modifiers, recipe
overrides) and pure server-side. If a future tweak is actually client-
relevant, this rule will need a per-file exception.

Tested in build output -- the brassandsigil_tweaks entry now shows
side='server' in the generated manifest.
This commit is contained in:
2026-05-23 17:40:34 +00:00
parent 5813c7555e
commit 135ecf4a5a
2 changed files with 16 additions and 3 deletions
+15 -2
View File
@@ -107,14 +107,27 @@ if ($LocalPackSource -and (Test-Path $LocalPackSource)) {
Get-ChildItem -Path $rootDir -Recurse -File | ForEach-Object {
$rel = $_.FullName.Substring($sourceFull.Length).TrimStart('\','/') -replace '\\','/'
$sha1 = (Get-FileHash -Algorithm SHA1 -Path $_.FullName).Hash.ToLowerInvariant()
$files += [pscustomobject]@{
# Tweak jars (built by Build-Tweaks.ps1 into pack/overrides/mods/)
# are pure data-only NeoForge mods -- worldgen modifiers, recipe
# overrides, etc. They typically depend on server-only libraries
# (Lithostitched, etc.) and have no client-side rendering. Default
# them to side="server" so the client doesn't try to load them
# without their server-only deps -> the loader otherwise refuses to
# start with "Mod X requires Y or above" errors. If a future tweak
# is genuinely client-relevant, override by editing this rule.
$entry = [ordered]@{
path = $rel
url = "$base/$rel"
sha1 = $sha1
size = $_.Length
}
if ($root -eq 'mods') { $entry.side = 'server' }
$files += [pscustomobject]$entry
$totalBytes += $_.Length
Write-Host (" [local] {0}" -f $rel)
$sideTag = if ($entry.side) { " [$($entry.side)]" } else { '' }
Write-Host (" [local] {0}{1}" -f $rel, $sideTag)
}
}
}