User avatar
rpiMike
Posts: 855
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Minecraft 1.13.2 running on Raspberry Pi

Wed Jun 12, 2019 2:46 pm

Finally got Minecraft 1.13.2 (with Optifine) running on Raspberry Pi 3B+ (using Gentoo 64bit).

I wouldn't necessarily call this playable, large swap file, lag when breaking blocks. However the fact it even runs is amazing.

https://www.youtube.com/watch?v=TNCQXd1QzAc

User avatar
digzuwu
Posts: 5
Joined: Thu Jun 13, 2019 1:47 pm
Location: Margate, Kent, GB

Re: Minecraft 1.13.2 running on Raspberry Pi

Thu Jun 13, 2019 2:04 pm

Nice, I wonder if any of the older versions would run any better?

tazz4843
Posts: 16
Joined: Thu May 11, 2017 10:04 pm
Location: Calgary, AB, Canada

Re: Minecraft 1.13.2 running on Raspberry Pi

Tue Jul 30, 2019 8:17 pm

Got a tutorial? I don't plan to do anything but play on a server.
Check me out on Reddit: reddit.com/u/tazz4843

Super_Pizza
Posts: 4
Joined: Thu Oct 11, 2018 11:59 am

Re: Minecraft 1.13.2 running on Raspberry Pi

Thu Sep 05, 2019 9:33 pm

Minecraft 1.13.2 Update:
I am getting close, the window pops up for a second, then:

Code: Select all

---- Minecraft Crash Report ----
// There are four lights!

Time: 05/09/19 5:12 PM
Description: Initializing game

java.lang.NoClassDefFoundError: org/lwjgl/stb/STBIWriteCallbackI
	at dei.<init>(SourceFile:29)
	at cft.a(SourceFile:347)
	at va.a(SourceFile:45)
	at dea.a(SourceFile:64)
	at ux.a(SourceFile:32)
	at cfw.a(GameSettings.java:3454)
	at cft.am(SourceFile:454)
	at cft.a(SourceFile:380)
	at net.minecraft.client.main.Main.main(SourceFile:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.stb.STBIWriteCallbackI
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 15 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at dei.<init>(SourceFile:29)
	at cft.a(SourceFile:347)
	at va.a(SourceFile:45)
	at dea.a(SourceFile:64)
	at ux.a(SourceFile:32)
	at cfw.a(GameSettings.java:3454)
	at cft.am(SourceFile:454)

-- Initialization --
Details:
Stacktrace:
	at cft.a(SourceFile:380)
	at net.minecraft.client.main.Main.main(SourceFile:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
	Minecraft Version: 1.13.2
	Operating System: Linux (arm) version 4.19.66-v7l+
	Java Version: 1.8.0_212, Oracle Corporation
	Java VM Version: OpenJDK Client VM (mixed mode), Oracle Corporation
	Memory: 204570232 bytes (195 MB) / 328036352 bytes (312 MB) up to 2120679424 bytes (2022 MB)
	JVM Flags: 5 total; -Xmn256M -Xmx2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy
	Launched Version: 1.13.1
	LWJGL: 3.2.3 build 11
	OpenGL: V3D 4.2 GL version 2.1 Mesa 19.1.0-devel, Broadcom
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Very likely; Jar signature invalidated
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: ~~ERROR~~ NullPointerException: null
	Profiler Position: N/A (disabled)
	CPU: 5x ARMv7 Processor rev 3 (v7l)
	OptiFine Version: OptiFine_1.13.2_HD_U_E7
	OptiFine Build: 20190322-164033
	Render Distance Chunks: 8
	Mipmaps: 4
	Anisotropic Filtering: 1
	Antialiasing: 0
	Multitexture: false
	Shaders: null
	OpenGlVersion: 2.1 Mesa 19.1.0-devel
	OpenGlRenderer: V3D 4.2
	OpenGlVendor: Broadcom
	CpuCount: 4
Script:

Code: Select all

#!/bin/bash
#
# script to run minecraft on ARM linux.  for reference:
#
#   http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/
#   https://devtalk.nvidia.com/default/topic/764821/embedded-systems/minecraft-on-the-jetson-tk1/
#   https://gist.github.com/rogerallen/91526c9c8be1a82881e0
#

# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
# your personal login/password.  chmod 700 to keep this private
[email protected]
MINECRAFT_USERNAME=Name
MINECRAFT_PASSWORD=Password
MINECRAFT_VERSION=1.13.1
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=~/Minecraft/Natives
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=Whatever
MINECRAFT_UUID=Again

# SHOULD NOT NEED TO EDIT BELOW THIS LINE

# long list of paths from the minecraft logged commandline
CP=/home/pi/.minecraft/libraries/optifine/OptiFine/1.13.2_HD_U_E7/OptiFine-1.13.2_HD_U_E7.jar:/home/pi/.minecraft/libraries/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar:/home/pi/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/pi/.minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:/home/pi/.minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:/home/pi/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/pi/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/pi/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/pi/.minecraft/libraries/com/mojang/brigadier/1.0.14/brigadier-1.0.14.jar:/home/pi/.minecraft/libraries/com/mojang/datafixerupper/1.0.19/datafixerupper-1.0.19.jar:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/pi/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/pi/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/pi/.minecraft/libraries/com/mojang/realms/1.13.9/realms-1.13.9.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar:/home/pi/.minecraft/versions/1.13.2-OptiFine_HD_U_E7/1.13.2-OptiFine_HD_U_E7.jar
TWEAK_CLASS=optifine.OptiFineTweaker

# thanks to xRoyx on the nvidia dev forums for this update.
# the authtoken changes daily, so we need to login to authenticate
MINECRAFT_ATOKEN="$(\
curl -i \
  -H "Accept:application/json" \
  -H "content-Type:application/json" \
  https://authserver.mojang.com/authenticate \
  -X POST \
  --data '{"agent": {"name": "Minecraft","version": 1}, "username": "'$MINECRAFT_LOGIN'", "password": "'$MINECRAFT_PASSWORD'",  "clientToken": "'$MINECRAFT_CLIENTTOKEN'" }' \
  | sed '/accessToken":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "todays access token = "$MINECRAFT_ATOKEN

MINECRAFT_UUID="$(\
curl -X POST -H 'Content-Type: application/json' https://api.mojang.com/profiles/minecraft --data '"'$MINECRAFT_USERNAME'"' \
| sed '/id":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "MINECRAFT_UUID="$MINECRAFT_UUID

# run minecraft with all the right commandline options
/usr/lib/jvm/java-8-openjdk-armhf/bin/java \
    -Xmn256M -Xmx2048M -XX:+UseConcMarkSweepGC \
    -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Djava.library.path=$MINECRAFT_NATIVE_PATH -cp $CP net.minecraft.launchwrapper.Launch --username $MINECRAFT_USERNAME --accessToken "$MINECRAFT_ATOKEN" --uuid "$MINECRAFT_UUID" --version $MINECRAFT_VERSION --userProperties {} --gameDir ~/.minecraft --assetsDir ~/.minecraft/assets --assetIndex $MINECRAFT_VERSION --tweakClass $TWEAK_CLASS

Assuming lwjgl3 is installed with following libraries: GLFW, jemalloc, openal, opengl, stb.
Note:I just got my Pi4B4 and I decided to do that for fun! 1.12.2 works well at 60fps.\
That's where I am at now... Mike, how did you do that?

Edit: Sorry... I forgot... typo fixed
Last edited by Super_Pizza on Wed Sep 11, 2019 12:01 am, edited 1 time in total.

ProDigit
Posts: 374
Joined: Tue Aug 30, 2011 1:24 am

Re: Minecraft 1.13.2 running on Raspberry Pi

Thu Sep 05, 2019 11:25 pm

Check how much RAM you got free while playing, and how much swap is used:

Code: Select all

free -h
You could try playing around with the VRAM settings (drag it to 64 or 32MB), and perhaps decrease the screen resolution to 720p.
Also, if the system still needs a swap, you could try installing raspbian on an external SSD; or use a Sandisk A2 or A1 micro SD card or a fast and modern USB 3.0 flash drive. They have faster IO rates than regular micro sd cards.

You could possibly get faster framerates on Raspbian, when having a good cooling solution (keeping the temperature under 60C), or adding in /boot/config.txt following line will allow your pi to run 10C higher temps before throttling:

Code: Select all

temp_soft_limit=70
I don't know if these options are available in Gentoo as well?

jdonald
Posts: 392
Joined: Fri Nov 03, 2017 4:36 pm

Re: Minecraft 1.13.2 running on Raspberry Pi

Fri Sep 06, 2019 12:37 am

Super_Pizza wrote:
Thu Sep 05, 2019 9:33 pm

Code: Select all

java.lang.NoClassDefFoundError: org/lwjgl/stb/STBIWriteCallbackI
...
	at net.minecraft.client.main.Main.main(SourceFile:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.lang.ClassNotFoundException: org.lwjgl.stb.STBIWriteCallbackI
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
This suggests that a native library such as liblwjgl_stb.so is trying to invoke a Java callback method that does not exist. That seems likely due to a library versioning mismatch.

If you're using the latest build of LWJGL3, you could instead try the slightly older libraries posted in the mmlpi topic. The 32-bit native ones worked for me to run 1.14.3, and MamiyaOtaru made them work with 1.14.4.

CatherineTaylor
Posts: 1
Joined: Fri Sep 06, 2019 9:56 am
Contact: Website

Re: Minecraft 1.13.2 running on Raspberry Pi

Fri Sep 06, 2019 10:00 am

grrrrr I'm crazy about it right now. Can anyone suggest for me some old versions that run smoothly?
hill climb racing

Super_Pizza
Posts: 4
Joined: Thu Oct 11, 2018 11:59 am

Re: Minecraft 1.13.2 running on Raspberry Pi

Wed Sep 11, 2019 1:39 am

Good News!
It works Now!
Scripts:
1.13.2:

Code: Select all

#!/bin/bash
#
# script to run minecraft on ARM linux.  for reference:
#
#   http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/
#   https://devtalk.nvidia.com/default/topic/764821/embedded-systems/minecraft-on-the-jetson-tk1/
#   https://gist.github.com/rogerallen/91526c9c8be1a82881e0
#

# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
# your personal login/password.  chmod 700 to keep this private
[email protected]
MINECRAFT_USERNAME=Name
MINECRAFT_PASSWORD=Password
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=~/Minecraft/Natives
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=Token
MINECRAFT_UUID=UUID
MINECRAFT_VERSION=1.13.1


# SHOULD NOT NEED TO EDIT BELOW THIS LINE

# long list of paths from the minecraft logged commandline
CP=/home/pi/.minecraft/libraries/optifine/OptiFine/1.13.2_HD_U_E7/OptiFine-1.13.2_HD_U_E7.jar:/home/pi/.minecraft/libraries/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar:/home/pi/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/pi/.minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:/home/pi/.minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:/home/pi/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/pi/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/pi/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/pi/.minecraft/libraries/com/mojang/brigadier/1.0.14/brigadier-1.0.14.jar:/home/pi/.minecraft/libraries/com/mojang/datafixerupper/1.0.19/datafixerupper-1.0.19.jar:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/pi/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/pi/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/pi/.minecraft/libraries/com/mojang/realms/1.13.9/realms-1.13.9.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/com/mojang/text2speech/1.10.3/text2speech-1.10.3.jar:/home/pi/.minecraft/versions/1.13.2-OptiFine_HD_U_E7/1.13.2-OptiFine_HD_U_E7.jar
TWEAK_CLASS=optifine.OptiFineTweaker

# thanks to xRoyx on the nvidia dev forums for this update.
# the authtoken changes daily, so we need to login to authenticate
MINECRAFT_ATOKEN="$(\
curl -i \
  -H "Accept:application/json" \
  -H "content-Type:application/json" \
  https://authserver.mojang.com/authenticate \
  -X POST \
  --data '{"agent": {"name": "Minecraft","version": 1}, "username": "'$MINECRAFT_LOGIN'", "password": "'$MINECRAFT_PASSWORD'",  "clientToken": "'$MINECRAFT_CLIENTTOKEN'" }' \
  | sed '/accessToken":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "todays access token = "$MINECRAFT_ATOKEN

MINECRAFT_UUID="$(\
curl -X POST -H 'Content-Type: application/json' https://api.mojang.com/profiles/minecraft --data '"'$MINECRAFT_USERNAME'"' \
| sed '/id":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "MINECRAFT_UUID="$MINECRAFT_UUID

# run minecraft with all the right commandline options
/usr/lib/jvm/java-8-openjdk-armhf/bin/java \
    -Xmn256M -Xmx2048M \
    -XX:+UseParallelGC \
    -XX:ParallelGCThreads=2 \
    -XX:MaxGCPauseMillis=100 \
    -XX:+DisableExplicitGC \
    -XX:TargetSurvivorRatio=90 \
    -XX:+AggressiveOpts \
    -Djava.library.path=$MINECRAFT_NATIVE_PATH \
    -cp $CP \
  net.minecraft.launchwrapper.Launch \
    --username $MINECRAFT_USERNAME \
    --accessToken "$MINECRAFT_ATOKEN" \
    --uuid "$MINECRAFT_UUID" \
    --version $MINECRAFT_VERSION \
    --userProperties {} \
    --gameDir ~/.minecraft \
    --assetsDir ~/.minecraft/assets \
    --assetIndex $MINECRAFT_VERSION \
    --tweakClass $TWEAK_CLASS
1.14.2:

Code: Select all

#!/bin/bash
#
# script to run minecraft on ARM linux.  for reference:
#
#   http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/
#   https://devtalk.nvidia.com/default/topic/764821/embedded-systems/minecraft-on-the-jetson-tk1/
#   https://gist.github.com/rogerallen/91526c9c8be1a82881e0
#

# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
# your personal login/password.  chmod 700 to keep this private
[email protected]
MINECRAFT_USERNAME=Name
MINECRAFT_PASSWORD=Password
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=~/Minecraft/Natives
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=Token
MINECRAFT_UUID=UUID
MINECRAFT_VERSION=1.14


# SHOULD NOT NEED TO EDIT BELOW THIS LINE

# long list of paths from the minecraft logged commandline
CP=/home/pi/.minecraft/libraries/optifine/OptiFine/1.14.2_HD_U_F1_pre15/OptiFine-1.14.2_HD_U_F1_pre15.jar:/home/pi/.minecraft/libraries/optifine/launchwrapper/2.0/launchwrapper-2.0.jar:/home/pi/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/pi/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/pi/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/pi/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/pi/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/pi/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/pi/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/pi/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/pi/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/pi/.minecraft/libraries/com/mojang/realms/1.14.16/realms-1.14.16.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb-natives-linux-arm32.jar:/home/pi/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/pi/.minecraft/versions/1.14.2/1.14.2.jar
TWEAK_CLASS=optifine.OptiFineTweaker

# thanks to xRoyx on the nvidia dev forums for this update.
# the authtoken changes daily, so we need to login to authenticate
MINECRAFT_ATOKEN="$(\
curl -i \
  -H "Accept:application/json" \
  -H "content-Type:application/json" \
  https://authserver.mojang.com/authenticate \
  -X POST \
  --data '{"agent": {"name": "Minecraft","version": 1}, "username": "'$MINECRAFT_LOGIN'", "password": "'$MINECRAFT_PASSWORD'",  "clientToken": "'$MINECRAFT_CLIENTTOKEN'" }' \
  | sed '/accessToken":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "todays access token = "$MINECRAFT_ATOKEN

MINECRAFT_UUID="$(\
curl -X POST -H 'Content-Type: application/json' https://api.mojang.com/profiles/minecraft --data '"'$MINECRAFT_USERNAME'"' \
| sed '/id":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"

echo "MINECRAFT_UUID="$MINECRAFT_UUID

# run minecraft with all the right commandline options
/usr/lib/jvm/java-8-openjdk-armhf/bin/java \
    -Xmn256M -Xmx2048M \
    -XX:+UseParallelGC \
    -XX:ParallelGCThreads=2 \
    -XX:MaxGCPauseMillis=100 \
    -XX:+DisableExplicitGC \
    -XX:TargetSurvivorRatio=90 \
    -XX:+AggressiveOpts \
    -Djava.library.path=$MINECRAFT_NATIVE_PATH \
    -cp $CP \
  net.minecraft.launchwrapper.Launch \
    --username $MINECRAFT_USERNAME \
    --accessToken "$MINECRAFT_ATOKEN" \
    --uuid "$MINECRAFT_UUID" \
    --version $MINECRAFT_VERSION \
    --userProperties {} \
    --gameDir ~/.minecraft \
    --assetsDir ~/.minecraft/assets \
    --assetIndex $MINECRAFT_VERSION \
    --tweakClass $TWEAK_CLASS
How to:
Install Minecraft as in 1.12.1 tutorial, installing 1.13.2/1.14.2
Install OptiFine for 1.13.2 or preview for 1.14.2 then go to https://www.lwjgl.org/customize and select arm32 then GLFW, jemalloc, OpenAL, OpenGL and stb.
Then unzip and put lwjgl-?.jar and its native in ~/.minecraft/libraries/org/lwjgl/lwjgl-?/3.x.x/ including lwjgl itself.
Aaand it should work... on a PI4B at least.
One thing: 1.14 takes a looong time to load, so be patient.
Weirdly Optifine requires original miecraft jar and custom launchwrapper. :|

Return to “Gaming”