diff --git a/scripts/decompile.sh b/scripts/decompile.sh index 12d5b075f..c52dcf6f5 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -25,7 +25,11 @@ versionjson="$workdir/Minecraft/$minecraftversion/$minecraftversion.json" if [ ! -f "$versionjson" ]; then echo "Downloading $minecraftversion JSON Data" verescaped=$(echo ${minecraftversion} | sed 's/\./\\./g') - jsonurl=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | grep -oE "https://.*?${verescaped}.json") + echo $verescaped + verentry=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | grep -oE "{\"id\": \"${verescaped}\".*?\.json") + echo $verentry + jsonurl=$(echo $verentry | grep -oE https:\/\/.*?\.json) + echo $jsonurl curl -o "$versionjson" "$jsonurl" echo "$versionjson - $jsonurl" fi