summarylogtreecommitdiffstats
path: root/minecraft
diff options
context:
space:
mode:
authorChristophe Robin2017-11-30 17:47:58 +0900
committerChristophe Robin2017-11-30 17:47:58 +0900
commitf0e5cb059170188db151ad0eecb07d0de876b9be (patch)
treede8db5ae2b1bb8ec30d60441a58f286f0e1a01d1 /minecraft
parent29acd4fce0667fc0210b6385875a20958a984a86 (diff)
downloadaur-f0e5cb059170188db151ad0eecb07d0de876b9be.tar.gz
Change java-runtime to JDK8, force binary to use it
Diffstat (limited to 'minecraft')
-rwxr-xr-xminecraft7
1 files changed, 5 insertions, 2 deletions
diff --git a/minecraft b/minecraft
index 5d27e917394d..8b437347f388 100755
--- a/minecraft
+++ b/minecraft
@@ -1,5 +1,8 @@
#!/bin/sh
+# We need to force Java 8 here since both Java 7 and 9 currently causes the game to crash
+export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
+
# Since launching the minecraft launch from the home directory bypass the update mechanism, I'm adding this
# small piece of code that will do a checksum of the versions.json file provided by mojang, if a new version
# of the game is out, I force a download of the launcher just to keep everyone up to date
@@ -9,7 +12,7 @@ MC_VERSION_URL=${MC_VERSION_URL:-"https://launchermeta.mojang.com/mc/game/versio
MC_SUM_FILE=${MC_SUM_FILE:-"${HOME}/.minecraft/versions.sum"}
# compute sums
-MC_VERSION_SUM=$( curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | sha256sum | cut -f 1 -d " " )
+MC_VERSION_SUM=$( curl -s "${MC_VERSION_URL}" | sha256sum | cut -f 1 -d " " )
MC_CURRENT_SUM=$( cat "$MC_SUM_FILE" 2>/dev/null )
if [ "$MC_VERSION_SUM" != "$MC_CURRENT_SUM" ]; then
@@ -23,4 +26,4 @@ else
exec java -jar /usr/share/minecraft/Minecraft.jar $@
fi
-unset MC_FORCE_UPDATE \ No newline at end of file
+unset MC_FORCE_UPDATE