add missing mods
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Integrates the CurseForge "third-party distribution disabled" mods that ATM10
|
||||
# ships. packwiz cannot download them automatically, so we embed them as direct
|
||||
# files in the pack (then served by your Gitea).
|
||||
#
|
||||
# Steps:
|
||||
# 1. Download the 7 .jar files listed below (open each URL, click Download).
|
||||
# 2. Put them in a .\excluded-jars\ folder at the pack root.
|
||||
# 3. Run: .\add-excluded-mods.ps1
|
||||
# 4. Then: .\update-pack.ps1 "ajout mods exclus"
|
||||
#
|
||||
# License note: these authors disabled automatic redistribution. For a private
|
||||
# pack between friends the risk is low, but keep it in mind (ideally a non-public
|
||||
# repo/host).
|
||||
#
|
||||
# ASCII-only on purpose: avoids PowerShell 5.1 encoding issues with accents.
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# packwiz slug (metafile mods/<slug>.pw.toml) ; expected jar name ; CF page
|
||||
$mods = @(
|
||||
@{ slug = "bad-wither-no-cookie-reloaded"; jar = "bwncr-neoforge-1.21.1-3.20.3.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/bad-wither-no-cookie-reloaded/files/6172735" }
|
||||
@{ slug = "create-aeronautics"; jar = "create-aeronautics-bundled-1.21.1-1.2.1.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/create-aeronautics/files/8003941" }
|
||||
@{ slug = "im-fast"; jar = "imfast-NEOFORGE-1.0.2.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/im-fast/files/5991453" }
|
||||
@{ slug = "more-overlays-updated"; jar = "moreoverlays-1.24.2-mc1.21.1-neoforge.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/more-overlays-updated/files/6981252" }
|
||||
@{ slug = "not-enough-animations"; jar = "notenoughanimations-neoforge-1.12.0-mc1.21.1.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/not-enough-animations/files/7818966" }
|
||||
@{ slug = "structory"; jar = "Structory_26.1_v1.3.16.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/structory/files/7850172" }
|
||||
@{ slug = "structory-towers"; jar = "Structory_Towers_26.1_v1.0.16.jar"; url = "https://www.curseforge.com/minecraft/mc-mods/structory-towers/files/7842394" }
|
||||
)
|
||||
|
||||
# Use local packwiz.exe if present, else the one on PATH
|
||||
$packwiz = if (Test-Path (Join-Path $PSScriptRoot "packwiz.exe")) { Join-Path $PSScriptRoot "packwiz.exe" } else { "packwiz" }
|
||||
|
||||
$srcDir = Join-Path $PSScriptRoot "excluded-jars"
|
||||
New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot "mods") | Out-Null
|
||||
|
||||
$missing = @()
|
||||
foreach ($m in $mods) {
|
||||
$src = Join-Path $srcDir $m.jar
|
||||
if (-not (Test-Path $src)) {
|
||||
$missing += $m
|
||||
continue
|
||||
}
|
||||
|
||||
# Remove the CurseForge metafile if present (else packwiz refresh keeps failing on it)
|
||||
$meta = Join-Path $PSScriptRoot ("mods/" + $m.slug + ".pw.toml")
|
||||
if (Test-Path $meta) {
|
||||
Write-Host ("==> packwiz remove " + $m.slug) -ForegroundColor Cyan
|
||||
& $packwiz remove $m.slug
|
||||
}
|
||||
|
||||
# Copy the jar straight into mods/ (will be indexed as a normal file)
|
||||
Copy-Item $src (Join-Path $PSScriptRoot ("mods/" + $m.jar)) -Force
|
||||
Write-Host (" + mods/" + $m.jar) -ForegroundColor Green
|
||||
}
|
||||
|
||||
if ($missing.Count -gt 0) {
|
||||
Write-Host ""
|
||||
Write-Host "Missing jars in .\excluded-jars\ - download them:" -ForegroundColor Yellow
|
||||
foreach ($m in $missing) {
|
||||
Write-Host (" - " + $m.jar)
|
||||
Write-Host (" " + $m.url)
|
||||
}
|
||||
Write-Host ""
|
||||
Write-Error "Drop the missing jars then run the script again."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "==> packwiz refresh" -ForegroundColor Cyan
|
||||
& $packwiz refresh
|
||||
Write-Host 'OK. Now run: .\update-pack.ps1 "ajout mods exclus"' -ForegroundColor Green
|
||||
Reference in New Issue
Block a user