1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-24 06:06:46 +00:00

bin: minecraft launcher in sh because i can

This commit is contained in:
Phantop 2022-12-12 18:31:08 -05:00
parent df3b855983
commit a427944adb
2 changed files with 11 additions and 1 deletions

View file

@ -79,7 +79,7 @@ for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1)
a $i "qutebrowser / \":open $i\""
end
for i in deemix diffoscope encodec lightnovel-crawler mandown mathicsscript nsz ratarmount scdl soundscrape spleeter
for i in deemix diffoscope encodec lightnovel-crawler mandown mathicsscript nsz portablemc ratarmount scdl soundscrape spleeter
a $i "pipx run $i"
end
a mathics 'pipx run --spec mathics-django mathicsserver'

10
bin/minecraft Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
if mkdir objects; then
d=$(curl https://piston-meta.mojang.com/mc/game/version_manifest.json | jq -r .versions[0].url)
wget "$(curl "$d" | jq -r .assetIndex.url)" -P indexes
jq -r .objects[].hash < indexes/2.json | sed 's#^\(..\)#https://resources.download.minecraft.net/\1/\1#' | 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 | grep -vE 'windows|macos' | 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.minecraft.client.main.Main --version . --assetsDir . --assetIndex 2 --accessToken 0 "$@"