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) } } }