Build-Pack: tweak jars default to side=server (urgent client fix) #36
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
||||||
"name": "Brass and Sigil",
|
"name": "Brass and Sigil",
|
||||||
"version": "0.22.2",
|
"version": "0.22.3",
|
||||||
"minecraft": "1.21.1",
|
"minecraft": "1.21.1",
|
||||||
"loader": {
|
"loader": {
|
||||||
"type": "neoforge",
|
"type": "neoforge",
|
||||||
|
|||||||
+15
-2
@@ -107,14 +107,27 @@ if ($LocalPackSource -and (Test-Path $LocalPackSource)) {
|
|||||||
Get-ChildItem -Path $rootDir -Recurse -File | ForEach-Object {
|
Get-ChildItem -Path $rootDir -Recurse -File | ForEach-Object {
|
||||||
$rel = $_.FullName.Substring($sourceFull.Length).TrimStart('\','/') -replace '\\','/'
|
$rel = $_.FullName.Substring($sourceFull.Length).TrimStart('\','/') -replace '\\','/'
|
||||||
$sha1 = (Get-FileHash -Algorithm SHA1 -Path $_.FullName).Hash.ToLowerInvariant()
|
$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
|
path = $rel
|
||||||
url = "$base/$rel"
|
url = "$base/$rel"
|
||||||
sha1 = $sha1
|
sha1 = $sha1
|
||||||
size = $_.Length
|
size = $_.Length
|
||||||
}
|
}
|
||||||
|
if ($root -eq 'mods') { $entry.side = 'server' }
|
||||||
|
|
||||||
|
$files += [pscustomobject]$entry
|
||||||
$totalBytes += $_.Length
|
$totalBytes += $_.Length
|
||||||
Write-Host (" [local] {0}" -f $rel)
|
$sideTag = if ($entry.side) { " [$($entry.side)]" } else { '' }
|
||||||
|
Write-Host (" [local] {0}{1}" -f $rel, $sideTag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user