Switch GTNH pack version metadata url to new endpoint (#3955)

This commit is contained in:
Caedis
2026-02-27 08:08:04 -06:00
committed by GitHub
parent a62be28cfd
commit 7c2c0ded70

View File

@@ -8,8 +8,11 @@ function getGTNHdownloadPath(){
gtnh_download_path=""
current_java_version=$(mc-image-helper java-release)
if ! packs_data="$(restify --tag=a https://www.gtnewhorizons.com/version-history/ | jq -r '.[].href | select(test("Server"))')"; then
logError "Failed to retrieve data from http://downloads.gtnewhorizons.com/ServerPacks/?raw"
if ! packs_data="$(
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
| jq -r '.versions[]?.server? | .[]? | select(type=="string" and test("Server"))'
)"; then
logError "Failed to retrieve data from https://downloads.gtnewhorizons.com/versions.json"
exit 1
fi
mapfile -t packs <<< "$packs_data"