mirror of
https://github.com/Phantop/dotfiles
synced 2025-01-14 00:26:58 +00:00
13 lines
1.1 KiB
Bash
Executable file
13 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
if mkdir objects indexes; then
|
|
d=$(curl https://piston-meta.mojang.com/mc/game/version_manifest.json | jq -r .versions[0].url)
|
|
curl "$(curl "$d" | jq -r .assetIndex.url)" > indexes/index.json
|
|
jq -r '.objects[].hash|"https://resources.download.minecraft.net/\(.[:2])/\(.)"' indexes/index.json | xargs aria2c -d objects -Z
|
|
( echo "cd objects"; printf "mkdir %02x; mv %02x* %02x\n" $(seq 0 255 | sed 'p;p') ) | sh
|
|
curl "$d" | jq .libraries[].downloads.artifact.url,.downloads.client.url | xargs aria2c -d objects -Z
|
|
d=$(curl "https://meta.fabricmc.net/v2/versions/loader/$(curl "$d" | jq -r .id)" | jq -r '.[0]|.launcherMeta.libraries.common[].name,(.loader,.intermediary).maven')
|
|
echo "$d" | sed -E ':b;s|\.(.*:)|/\1|;tb; s|(.*):(.*):(.*)|https://maven.fabricmc.net/\1/\2/\3/\2-\3.jar|' | xargs aria2c -d objects -Z
|
|
fi
|
|
java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -Xms1G -Xmx8G\
|
|
-cp 'objects/*' net.fabricmc.loader.impl.launch.knot.KnotClient --assetsDir . --assetIndex index --accessToken 0 "$@"
|