From 135ecf4a5a4d2162d21d45aba7b3f7b99c959b48 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 23 May 2026 17:40:34 +0000 Subject: [PATCH] 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. --- pack/pack.lock.json | 2 +- scripts/Build-Pack.ps1 | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pack/pack.lock.json b/pack/pack.lock.json index 52c05c2..865ac13 100644 --- a/pack/pack.lock.json +++ b/pack/pack.lock.json @@ -1,7 +1,7 @@ { "$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing", "name": "Brass and Sigil", - "version": "0.22.2", + "version": "0.22.3", "minecraft": "1.21.1", "loader": { "type": "neoforge", diff --git a/scripts/Build-Pack.ps1 b/scripts/Build-Pack.ps1 index 50965cd..e21feee 100644 --- a/scripts/Build-Pack.ps1 +++ b/scripts/Build-Pack.ps1 @@ -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) } } }