TamaTamaGoGo
Posts: 33
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Fri Dec 27, 2019 5:31 am

In my minecraft1.12.2, that game is very slow to load my world.
And if I enter the world, my launcher will be load.
But the laucher timeout to login my world. :(
What should I do :?:
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!

Xann
Posts: 3
Joined: Sat Sep 21, 2019 11:08 pm

Full or Fake KMS

Fri Dec 27, 2019 6:49 pm

rpiMike wrote:
Fri Dec 27, 2019 12:08 am
You need OpenGL which is only enabled with Full or Fake KMS. Why can’t you flash an sd card with Raspbian Buster?
Okay! Thank you! :)
By Xann. :D

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Wed Jan 01, 2020 5:05 pm

Howdy folks. Just wanted to raise awareness that 1.14.4 has been gotten working with a relatively painless setup script as detailed in this thread
https://www.raspberrypi.org/forums/view ... 6&t=260357
on the Pi4. No 64bit shenanigans seem required, and I'm in the process of trying to chase down the source of an intermittent crash as we speak. The periodicity of the intermittent crash is generally long on a Pi4 that isn't hosting anything but OS base services. By long I mean the absolute fastest I've managed to get it to crash is about 15 minutes by basically torturing the thing to try to coax it into dying.

Just playing sanely tends to yield anywhere from 45 minutes to an hour or two of stability in my experience. Multiplayer is what I've been testing, and I have successful server connection from both Local Area Network, and over the Net proper from another RPi4 (even over VNC amusingly).

Can't say anything w.r.t. Forge, but the Optifine works. No thermal accommodation on my part besides the hightop case.

Also forgot, should work even with openjdk8 installed, you should only have to install the openjdk-jdk-8 (think that was the package...) package and change the run script java invocation from pointing to /opt/jdk/ blah blah to /usr/bin/java and removing the -XX:CMSIncrementalMode argument.

Though you need to make sure you update your alternatives so the jdk11 isn't the default java you hit.

Instructions:

Update alternatives:
update-alternatives --config java and follow instructions to set your openjdk8 as the default. Or just go ahead and install the Oracle one. Either way, tested both out of my seething hatred for everything Oracle.

In the process of trying to compile a different memory allocator library to kill the intermittent crash (I hope). Will post back with results.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Thu Jan 02, 2020 6:15 am

Oof. Well. That was a day.

So, highlights:

Mucked around nipping stuff from the classpath. For example, you don't need the .so files on the classpath if you have the -Djava-library-path set to the folder containing them. Also, any arm64 related stuff can get dropped too, since the jdk you'd most likely be using is arm32. The upshot of doing that is less crap loaded by the JVM. Less crap=more memory for the stuff you want.

This libjemalloc error has certainly turned into a bucket of something. I've

A) compiled from source
B)attached visualvm to the game and even done a heap dump to try to get more of a clue what's up with that allocator business
C)turned up LD_DEBUG to "Uncomfortably verbose", and come to find the library wasn't even being loaded directly by the linker, but rather through the JVM libraries kinda pretending to be the linker, but not rreally, and nothing about the messages I was getting from the linker about what was trying to be linked to made a lick of sense.

I am now way more familiar with the Linux linker and various dynamic library related tools than I ever wanted to be.

I've pulled down the lwjgl sources in preparation for a deep dive into....that? Once I've slept on things and collected my thoughts.

Longest runtime without crash is was hour and a half of continual dinking around underground. At 1920x1080, with a few settings tweaked, and significant debug stuff on, was clocking in at 10 fps surface and generally 18ish underground.

Anywho. I did not in the beginning dream I'd be digging down this deep, but at this point, I'm kinda committed, and seeing as I've got AArch64 toolchains set up anyway, I may go ahead and work on compiling an openjdk8 for Aarch64 if I end up getting too stuck, which will hopefully obviate any 32 bit memory cap concerns entirely.

Anyway... Sleep required.

mtylerb
Posts: 32
Joined: Sat Apr 07, 2018 3:14 am
Location: Warburg, AB, Canada

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sun Jan 05, 2020 6:46 pm

Salawat wrote:
Thu Jan 02, 2020 6:15 am
Oof. Well. That was a day.

So, highlights:

Mucked around nipping stuff from the classpath. For example, you don't need the .so files on the classpath if you have the -Djava-library-path set to the folder containing them. Also, any arm64 related stuff can get dropped too, since the jdk you'd most likely be using is arm32. The upshot of doing that is less crap loaded by the JVM. Less crap=more memory for the stuff you want.

This libjemalloc error has certainly turned into a bucket of something. I've

A) compiled from source
B)attached visualvm to the game and even done a heap dump to try to get more of a clue what's up with that allocator business
C)turned up LD_DEBUG to "Uncomfortably verbose", and come to find the library wasn't even being loaded directly by the linker, but rather through the JVM libraries kinda pretending to be the linker, but not rreally, and nothing about the messages I was getting from the linker about what was trying to be linked to made a lick of sense.

I am now way more familiar with the Linux linker and various dynamic library related tools than I ever wanted to be.

I've pulled down the lwjgl sources in preparation for a deep dive into....that? Once I've slept on things and collected my thoughts.

Longest runtime without crash is was hour and a half of continual dinking around underground. At 1920x1080, with a few settings tweaked, and significant debug stuff on, was clocking in at 10 fps surface and generally 18ish underground.

Anywho. I did not in the beginning dream I'd be digging down this deep, but at this point, I'm kinda committed, and seeing as I've got AArch64 toolchains set up anyway, I may go ahead and work on compiling an openjdk8 for Aarch64 if I end up getting too stuck, which will hopefully obviate any 32 bit memory cap concerns entirely.

Anyway... Sleep required.
I found an error in the original script thanks to sissyneck's feedback. It was trying to unarchive "211" instead of "8u211" for the Java archive. It was causing a headache and early exit in the script. It's fixed now, though I doubt this has anything to do with your digging, but I figured I'd pass it on anyway. I also noticed that the system didn't seem to be using the downloaded Java JDK. I hardlinked the "java" references in the tutorial so that I could be sure it was using the Java 8 JDK.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sun Jan 05, 2020 8:57 pm

mtylerb wrote:
Sun Jan 05, 2020 6:46 pm

I found an error in the original script thanks to sissyneck's feedback. It was trying to unarchive "211" instead of "8u211" for the Java archive. It was causing a headache and early exit in the script. It's fixed now, though I doubt this has anything to do with your digging, but I figured I'd pass it on anyway. I also noticed that the system didn't seem to be using the downloaded Java JDK. I hardlinked the "java" references in the tutorial so that I could be sure it was using the Java 8 JDK.
Found a few of those too. I'm still alive, by the way. I've just been fighting some nasty sinus bug the last week or so. Nothing kills the drive to rip something apart and figure out what makes it tick like sinus pain. My mortal weakness if you will.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Mon Jan 06, 2020 7:04 am

Update folks.

In a fit of Sudafed fueled madness, I sat down and said to myself, "Ya know, I never did test my base invariants."

To which I responded "And what would those be?"

"Like the whole 64 bit thing. That the bundled jemalloc native library actually works. That the 32 bit natives don't work with this version, or with a 32 bit JDK."

So... I stripped everything down to basics.

Wiped out the libraries in lwjgl3arm32 that weren't suffixed with a 32. Extracted jemalloc.so from the .jar file into the lwjgl3arm32 folder, and renamed the rest of the .so files from lib<whatever>32.so to lib<whatever>.so, and ran the run script.

With most debug stuff turned off, I'm at about 12 fps at 1920x1080 on the surface, and ran around like a ninny trying to coax a crash out of it for the last 3+ hours. Steady as a bloody rock.

The jemalloc library loaded okay. Everything else loaded okay. I think I've got a configuration I'm willing to call a stable baseline.

I've also got a pretty good idea of what the major moving pieces are, and think I'll take some time to try writing up a guide to share the learnings. If there's a version 1.15 Optifine, I'll take a look at getting that running as well. Figuring out Forge in such a way as to maintain sound output will be a stretch goal.

Stay tuned. Will try to have writeup for tomorrow.

mtylerb
Posts: 32
Joined: Sat Apr 07, 2018 3:14 am
Location: Warburg, AB, Canada

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Mon Jan 06, 2020 2:42 pm

Salawat wrote:
Mon Jan 06, 2020 7:04 am
Update folks.

In a fit of Sudafed fueled madness, I sat down and said to myself, "Ya know, I never did test my base invariants."

To which I responded "And what would those be?"

"Like the whole 64 bit thing. That the bundled jemalloc native library actually works. That the 32 bit natives don't work with this version, or with a 32 bit JDK."

So... I stripped everything down to basics.

Wiped out the libraries in lwjgl3arm32 that weren't suffixed with a 32. Extracted jemalloc.so from the .jar file into the lwjgl3arm32 folder, and renamed the rest of the .so files from lib<whatever>32.so to lib<whatever>.so, and ran the run script.

With most debug stuff turned off, I'm at about 12 fps at 1920x1080 on the surface, and ran around like a ninny trying to coax a crash out of it for the last 3+ hours. Steady as a bloody rock.

The jemalloc library loaded okay. Everything else loaded okay. I think I've got a configuration I'm willing to call a stable baseline.

I've also got a pretty good idea of what the major moving pieces are, and think I'll take some time to try writing up a guide to share the learnings. If there's a version 1.15 Optifine, I'll take a look at getting that running as well. Figuring out Forge in such a way as to maintain sound output will be a stretch goal.

Stay tuned. Will try to have writeup for tomorrow.
That's great. Once I see this, I'll test and update my script. No OptiFine for 1.15 yet. Was looking for it yesterday. But I'm going to work on a script as soon as it comes out.

damn_buster
Posts: 1
Joined: Mon Jan 06, 2020 9:26 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Mon Jan 06, 2020 9:29 pm

does it work on macos

Pixonepro
Posts: 1
Joined: Thu Jan 09, 2020 9:56 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Thu Jan 09, 2020 9:58 pm

I have tried this on RPI 4 clean install but with a 7” official touchscreen... Is there a way to get it to function as a screen while playing Minecraft? Thanks :D

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Fri Jan 10, 2020 1:14 am

Hey folks, Here's the short version of what needs updating. I've included my staging script for getting the lwjgl natives and jars set up in the homedirectory, and an example drop in replacement for the value of the classpath argument in the run script.

Afterword is a wall of text I figured I'd throw together to try to communicate the "academic" stuff, feel free to ignore, as it's a bit scattered, but should be informative for anyone who finds themselves in the unenviable position of following in my footsteps.

But first the short version.
Section 4: bringing it all together.

So! The only "missing" part is our lwjgl platform which can be made with the following script.

Code: Select all

#!/bin/sh

mkdir ~/lwjgl3arm32/
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/libglfw.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/libjemalloc.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_openal.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_opengl.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_stb.so


wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-glfw/lwjgl-glfw.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-jemalloc/lwjgl-jemalloc.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl/lwjgl.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-openal.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-opengl.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-stb.jar

echo "Staging of LWJGL Natives complete."
And to modify the -cp argument of the run script to reflect our platform. Namely something like

Code: Select all

/home/<user>/.minecraft/libraries/optifine/OptiFine/1.14.4_HD_U_F3/OptiFine-1.14.4_HD_U_F3.jar:/home/<user>/.minecraft/libraries/optifine/launchwrapper-of/2.1/launchwrapper-of-2.1.jar:/home/<user>/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/<user>/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/<user>/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/<user>/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/<user>/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/<user>/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/<user>/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/<user>/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/<user>/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/<user>/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/<user>/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/<user>/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/<user>/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/<user>/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/<user>/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/<user>/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/<user>/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc.jar:/home/<user>/lwjgl3arm32/lwjgl-openal.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl.jar:/home/<user>/lwjgl3arm32/lwjgl-stb.jar:/home/<user>/lwjgl3arm32/lwjgl.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-openal-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-stb-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-natives-linux-arm32.jar:/home/<user>/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/<user>/.minecraft/versions/1.14.4-OptiFine_HD_U_F3/1.14.4-OptiFine_HD_U_F3.jar net.minecraft.launchwrapper.Launch
Last edited by Salawat on Fri Jan 10, 2020 5:39 am, edited 1 time in total.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Fri Jan 10, 2020 1:38 am

The long version:

Okay folks, bit of a long post for posterity, and to enlighten the curious or otherwise desperate. Be warned. You may learn more about how the sausage is made than you every wanted to know. Regardless, it is my hope the following post should leave you in a better place to be able to maintain your loved one's RasPi fulfilled Minecraft cravings for the foreseeable future.

Section 1: The Moving Parts

The setup script we've been using relies on a couple discrete pieces of programming to make everything work. I take no responsibility for why this is necessary, I'm just the poor sod trying to translate it for you.

The major pieces are:

--Minecraft proper: i.e. Minecraft.jar

--OptiFine: A mod that can be utilized to tweak the way the Minecraft java program interacts with the underlying game framework in ways that should improve performance and resource consuption.

--LWJGL: The LightWeight Java Gaming Library. This is the heavy lifter and the one we are most concerned with in terms of possibly needing to replace files, Before we get to mucking around with anything though; lets take a look at the footprint for a working configuration of Minecraft.

Section 2: Known good system footprint

The Minecraft footprint is pretty simple.
You have the launcher jar, Minecraft.jar in whatever folder you pull it down into. In our case, lets just say /home/<user>/Minecraft

That launcher isn't the game per-se, but a platform for reaching out and collecting all the disparate pieces required to make everything work. All these tasty little bits of metadata get dropped into /home/<user>/.minecraft

This folder contains all the juicy information we need to create a working understanding of the program at large. Later on, I'll integrate some industry know-how so you can recognize some of the patterns used in modern software development so that if you run into similarly implemented games in the future, you can at least stand a decent chance of making sense of it.

These are the subfolders of the .minecraft folder:

/assets --Game assets: these are static assets we shouldn't need to mess with. These are the CONTENT of the game basically, usually compressed in one way or another up to the whims of the developers. You can muck with it at your own peril, but I'd avoid it.

/crash-reports --Need I say more?

/libraries --This is where all the arifacts that the game is dependent on are downloaded to and stored. This folder follows a software repository pattern that should be instantly recognizable to anyone who has used Maven/Gradle or any other build systems in Software development. The idea is that we should be able to trivially pull down dependencies and add them in an automated manner to the eventual game invocation command. Note that you may have several different versions of these dependencies based on the version of the game you are launching. This is likely why Mojang went with the launcher to handle the logistics so you don't have to. Unfortunately, if you're reading this, odds are you are off the supported reservation.

/resourcespacks --Repository for Client local resource packs. Mainly relevant to running a game on a local world or single player.

/server-resource-packs --same basic idea as resource-packs, but should in theory be recieved from a remote-server. No idea if that mechanism actually exists, because I haven't tested that scenario yet, but boy wouldn't it be nice?

/saves
/screenshots --All of these should be pretty self explanatory
/shadercache

/versions --This folder is actually a gold-mine of information about the footprint for each version. You can get the answers to questions like:

--What version of lwjgl libraries go with a certain version of the game?
--What command line arguments are required to start the game?
--Where did all those libraries come from anyway?

and so on and so forth in the /versions/<version-number>/<version-number>.json file

OptiFine, which we haven't talked about much yet, also creates a directory under versions alongside the version it is supposed to support as part of it's install process. More on that later. So how does everything fit together?

Minecraft.jar supplies the auth framework/downloader/invocation generating logic to prep your system for running a particular Minecraft client. The game itself is inside the <version>.jar. All the data needed to generate the invocation line to fire up the JVM is contained in the <version-name>.json file under /versions

Section 3: 'Kay. That gets me working how?

Well, it doesn't actually. That's what they intended to do all the heavy lifting for systems they actually support.

Which is to say, x86/x86_64 Windows/Mac/Linux systems
We, on the otherhand, are running arm32. Yeah. Fat chance everything is just going to work. HOWEVER, we still learned something important! We now know how THEY expect it to work. So we know approximately what we have to imitate to get US working! That means we have a direction! That is good.

Sub-section: You mentioned 86x's and an Arm... I'm confused

Aren't we all? Suffice it to say, for all it matters, Mojang is expecting the computer to speak a fundamentally different "machine language" than that of the Pi. That's why we have to muck around to get this working at all. This difference in architecture propagates back through the dependencies in admittedly unintuitive ways, so let me take a moment to describe THAT.

Sub-section: Everything you didn't want to know about Minecraft

Minecraft is the worst type of Java Application. It ends up implementing functionality by splitting implementations between nice "safe" Java code with memory management handled through the JVM, and external native code that is delegated to in order to interface with well known, and oft-utilized game development frameworks Opengl/Openal/etc...

This is a blessing and a curse software development-wise. The Java only parts you basically get cross-platform compatibility for free due to the guarnateed functionality provided by a JVM. It's a curse, becasue you're having to go OUTSIDE the JVM for the more computation heavy parts, which requires natively compiled libraries.

Natively compiled libraries that Mojang assues will be compiled for x86/x86_64 architecture. Which we are not. Happily, however, we can work around that, by going to the people who implemented the lwjgl framework.

Not only is it open source, but they also have a neat little interface that allows you to pull down an entire distribution of their framework as the basis for any game that was built on it at https://www.lwjgl.org/customize

In Minecraft's case, that would be 3.2.2 based on what you find as dependencies in the 1.14.4.json file, which coincidentally, also does not support an arm32 build if you visited it on the customize page. But we shall perseve!

Still with me? About to run screaming or thinking of just going and doing something else? Do me a favor, and keep reading on. It'll be worth it, I promise. Get a cup of coffee too, because it's time to talk....

Sub-section: Java

Heck yeah. EVERYONE's favorite programming language, am I right?

Not much to touch on here, but just a few intro concepts:

JVM: Runs Java Bytecode
Jars: Archives of compiled Java Bytecode and other files. The dedicated Archiver is basically a glorified Gzip in terms of interface.

Invocation: The java virtual machine is controlled via it's invocation on the command line

The typical command tends to look like
java \ <-this is a version specific executable, typically in a JDK or JRE
-X[VM memory args] \
-D[plethora of properties to passed to the VM to change behavior] \
-cp <long, colon seperated list of locations to look for requisite code to be run> entrypoint \
<spice with other POSIX goodness>

The important things to worry about are the following:
What version is your JDK?
Where is it?
Who made it? (OpenJDK doesn't necessarily support the same functionality as the Oracle one does)
What architecture was it built for? <--IMPORTANT, but not for getting running right now. Why? Because if we run a 32 bit JVM on Java Bytecode that MUST do 64 bit computation, we're going to have a bad time. Apparently it has been floating around that versions post 1.12.2 of Minecraft require 64 bit JVM's to work. My testing does not support this assertion. In this case this is a boon for us, because it means we don't even have to worry about building a 64 bit JDK or any of it's dependencies. HOORAY! Though we will have to limit our memory footprint to 2 gigs.

Now, lets talk...

Sub-section: LWJGL

So, LWJGL basically defines the requisite hoops to jump through in order to allow control flow from within the JVM, out to natively compiled libraries. That means that even though an LWJGL distro comes entirely packed as jar's, There is actually non-Java bytecode packed in there that the framework will generally try to unpack somewhere, and then whenever that functionality needs to be referenced, will go through the arcane black-magic invocations to ensure that those libraries in particular get delegated to correctly. Our goal then in the project ahead of us, is to essentially play the role of Mojang's launcher, combining a little bit of Java knowledge, a little *Nix knowledge, and a lot of headdesk, to make workspace, stage things properly, invoke, and enjoy.

The footprint of the LWJGL dependencies looks as follows:

./.minecraft/libraries/org/lwjgl
├── lwjgl
│   └── 3.2.2
│   ├── lwjgl-3.2.2.jar
│   └── lwjgl-3.2.2-natives-linux.jar
├── lwjgl-glfw
│   └── 3.2.2
│   ├── lwjgl-glfw-3.2.2.jar
│   └── lwjgl-glfw-3.2.2-natives-linux.jar
├── lwjgl-jemalloc
│   └── 3.2.2
│   ├── lwjgl-jemalloc-3.2.2.jar
│   └── lwjgl-jemalloc-3.2.2-natives-linux.jar
├── lwjgl-openal
│   └── 3.2.2
│   ├── lwjgl-openal-3.2.2.jar
│   └── lwjgl-openal-3.2.2-natives-linux.jar
├── lwjgl-opengl
│   └── 3.2.2
│   ├── lwjgl-opengl-3.2.2.jar
│   └── lwjgl-opengl-3.2.2-natives-linux.jar
└── lwjgl-stb
└── 3.2.2
├── lwjgl-stb-3.2.2.jar
└── lwjgl-stb-3.2.2-natives-linux.jar

12 directories, 12 files

The last piece, OptiFine, is some Java code to help us with that with their relfective launcher wrapper, while at the same time providing some extra handles for us to tweak performance to our liking.

Section 4: Bringing it all together!

So the moment you've all been waiting for:

Making this stuff work!

Remember that setup script?

Code: Select all

#!/bin/sh -e
echo begin setupMC1_14_4
 
DIR=~/Minecraft
 
# create folders
echo Setup 1/11
if [ ! -d "$DIR" ]; then
    mkdir "$DIR"
fi
cd "$DIR"
pwd
 
echo Setup 2/11
if [ ! -d ~/lwjgl3arm32 ]; then
    mkdir ~/lwjgl3arm32        
fi
 
# download minecraft
echo Setup 3/11
if [ ! -f Minecraft.jar ]; then
    wget https://www.dropbox.com/s/rwhgz44l3k7noc3/Minecraft.jar
fi
 
# download java  
echo Setup 4/11
if [ ! -f jdk-8u211-linux-arm32-vfp-hflt.tar.gz ]; then
    wget https://www.dropbox.com/s/3na76g0uc1sm10n/jdk-8u211-linux-arm32-vfp-hflt.tar.gz
fi
 
# download optifine
echo Setup 5/11
if [ ! -f OptiFine_1.14.4_HD_U_F3.jar ]; then
    wget https://www.dropbox.com/s/64nagns0c2c0233/OptiFine_1.14.4_HD_U_F3.jar
fi
 
# download lwjgl3arm32
echo Setup 6/11
if [ ! -f lwjgl3arm32.tar.gz ]; then
    wget https://www.dropbox.com/s/x83cig62cte7wcz/lwjgl3arm32.tar.gz #<--This part can be replaced by running stage.sh in ~/lwjgl3arm32
fi
 
echo Setup 7/11
if [ ! -d /opt/jdk ]; then
    sudo mkdir /opt/jdk
fi

echo Setup 8/11
if [ ! -f Minecraft.desktop ]; then
    wget https://www.dropbox.com/s/3jimo82m3vtki45/Minecraft.desktop
fi
 
# extract oracle java  8
echo Setup 9/11
echo Extracting java ...
sudo tar -zxf jdk-8u211-linux-arm32-vfp-hflt.tar.gz -C /opt/jdk
 
# extract lwjgl3arm32
echo Setup 10/11
echo Extracting lwjgl3arm32 ...
tar -zxf lwjgl3arm32.tar.gz -C ~/lwjgl3arm32
 
# get run script
echo Setup 11/11
wget https://www.dropbox.com/s/qfef9kk9yfrhjnb/runMC1_14_4_OptifineF3.sh
sudo chmod +x runMC1_14_4_OptifineF3.sh  
 
echo end setupMC1_14_4
Remember that run script?

Code: Select all

#!/bin/sh
#
# 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
#
############################USER STUFF#####################################  
# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
# your personal login/password.  chmod 700 to keep this private
MINECRAFT_LOGIN=#UserEmail
MINECRAFT_USERNAME=#Screenname
MINECRAFT_PASSWORD=#APassword
 
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=/home/<user>/lwjgl3arm32/
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=b61fb8e9-97bf-435f-8354-1feaba0ce734
MINECRAFT_UUID=12345678-1234-1234-1234-123456789abc
MINECRAFT_VERSION=1.14
 
TWEAK_CLASS=optifine.OptiFineTweaker
###########################END USER STUFF###############################
 #######################API STUFF###################################
MINECRAFT_ATOKEN="$(\
curl -k -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 -k -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' \
)"
###############################END API STUFF################################

#################################INVOCATION################################
echo "MINECRAFT_UUID="$MINECRAFT_UUID
#-XX:+CMSIncrentalMode #Oracle specific GC optimization 
#export LD_DEBUG="all" #HORRIBLY VERBOSE SCREECHING BY THE LINKER
/usr/bin/java -Xmx2G -XX:+UseConcMarkSweepGC -XX:-UseAdaptiveSizePolicy -Xmn1G -Djava.library.path=/home/<user>/lwjgl3arm32: -Dminecraft.launcher.brand=java-minecraft-launcher -Dminecraft.launcher.version=1.6.89-j -Dorg.lwjgl.system.allocator=jemalloc -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.system.jemalloc.libname=/home/<user>/lwjgl3arm32/libjemalloc.so -cp /home/<user>/.minecraft/libraries/optifine/OptiFine/1.14.4_HD_U_F3/OptiFine-1.14.4_HD_U_F3.jar:/home/<user>/.minecraft/libraries/optifine/launchwrapper-of/2.1/launchwrapper-of-2.1.jar:/home/<user>/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/<user>/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/<user>/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/<user>/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/<user>/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/<user>/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/<user>/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/<user>/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/<user>/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/<user>/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/<user>/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/<user>/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/<user>/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/<user>/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/<user>/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/<user>/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/<user>/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc.jar:/home/<user>/lwjgl3arm32/lwjgl-openal.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl.jar:/home/<user>/lwjgl3arm32/lwjgl-stb.jar:/home/<user>/lwjgl3arm32/lwjgl.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-openal-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-stb-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-natives-linux-arm32.jar:/home/<user>/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/<user>/.minecraft/versions/1.14.4-OptiFine_HD_U_F3/1.14.4-OptiFine_HD_U_F3.jar 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 2>&1| tee ./run.log
##################################END INVOCATION############################

Lets pick this apart and get to understand what this thing is doing.

The USER STUFF is pretty self explanatory. Enter email of the Mojang account, Screenname of the player, and the account password. Enter the version to tell the run script which version of the game to home in on. This information is used by the API STUFF in order to get a few values back from Mojang that we need for the invocation.

The invocation is the most important part. This is where everything comes together to make Minecraft do it's thing. This single command:

-Invokes the JVM
-tells the JVM where to find all the libraries
-sets flags that alter the behavior of some libraries for debugging purposes
-etc.

So lets break it down, but by bit.

Code: Select all

/usr/bin/java 
In my case, I'm using OpenJDK 11 and nothing breaks!

Code: Select all

-Xmx2G -XX:+UseConcMarkSweepGC -XX:-UseAdaptiveSizePolicy -Xmn1G
Buncha VM args, leave em alone. Do note that the 2G there can't actually get larger in a 32 bit program. Luckily, in practice, unmodded, I'm running between 20 and 45% of that memory consumption, so there's plenty of overhead to stretch into if I can get the Modding stuff working.

IMPORTANT!:

Code: Select all

-Djava.library.path=/home/<user>/lwjgl3arm32 
This is how you tell minecraft to find the arm32 compiled libraries you pulled down from LWJGL Make sure to add this to your run script.

Code: Select all

-Dminecraft.launcher.brand=java-minecraft-launcher -Dminecraft.launcher.version=1.6.89-j 
More Mojang stuff....

Code: Select all

-Dorg.lwjgl.system.allocator=jemalloc -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.system.jemalloc.libname=/home/<user>/lwjgl3arm32/libjemalloc.so  
-Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true -Dorg.lwjgl.util.DebugAllocator=true-Dorg.lwjgl.system.allocator=jemalloc -Dorg.lwjgl.system.jemalloc.libname=/home/salawat/lwjgl3arm32/libjemalloc.so -Dorg.lwjgl.util.DebugFunctions=true 
DEBUG STUFF! The above may slow the game down some, but the extra error messages you get access to makes figuring out a problem way easier. If there is any one I recommend adding to your normal invocation it's the -Dorg.lwjgl.util.Debug=true as that will give you the kind of logging on the command line that eventually enabled me to dig into the rest of this mess.

The classpath:

Code: Select all

-cp /home/<user>/.minecraft/libraries/optifine/OptiFine/1.14.4_HD_U_F3/OptiFine-1.14.4_HD_U_F3.jar:/home/<user>/.minecraft/libraries/optifine/launchwrapper-of/2.1/launchwrapper-of-2.1.jar:/home/<user>/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/<user>/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/<user>/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/<user>/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/<user>/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/<user>/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/<user>/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/<user>/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/<user>/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/<user>/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/<user>/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/<user>/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/<user>/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/<user>/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/<user>/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/<user>/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/<user>/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc.jar:/home/<user>/lwjgl3arm32/lwjgl-openal.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl.jar:/home/<user>/lwjgl3arm32/lwjgl-stb.jar:/home/<user>/lwjgl3arm32/lwjgl.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-openal-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-stb-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-natives-linux-arm32.jar:/home/<user>/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/<user>/.minecraft/versions/1.14.4-OptiFine_HD_U_F3/1.14.4-OptiFine_HD_U_F3.jar net.minecraft.launchwrapper.Launch \
Note there are two major different paths of jar in this list.

/home/<user>/.minecraft/libraries/*
and
/home/<user>/lwjgl3arm32/*

Everything in /home/<user>/.minecraft/libraries/* should be put there by running the Minecraft.jar initial download steps, and the OptiFine install. Note that the regular launcher crashes because the assumptions it makes about your underlying system are bad; hence why we are using the custom run script.

I'll attach the script I used for setting up the LWJGL platform.

Code: Select all

#!/bin/sh

mkdir ~/lwjgl3arm32/
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/libglfw.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/libjemalloc.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_openal.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_opengl.so
wget https://build.lwjgl.org/release/3.2.3/linux/arm32/liblwjgl_stb.so


wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-glfw/lwjgl-glfw.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-jemalloc/lwjgl-jemalloc.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl/lwjgl.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-openal.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-opengl.jar
wget https://build.lwjgl.org/release/3.2.3/bin/lwjgl-openal/lwjgl-stb.jar
echo "Staging of LWJGL Natives complete."

Then just use the previously mentioned run script.

In the end, Follow the setup original setup script.

If you're worried about the provenance, use the described stage.sh

Use the run script, and make sure you're just using 32 bit binaries until someone gets around to compiling an arm64 JDK, which I'm getting ready to do, but will probably take a really long contrived route to being useful to anyone else, because I'll be having to learn 3 or 4 different communities worth of processes to get things into a state where it's a readily available thing and not just a bunch of stuff I compiled and works on my machine. .

Thanks for sticking with me through the brain dump!

Sorry it took so long, and sorry it's so scatter brained\dense! I wanted to make sure I touched on everything.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Fri Jan 10, 2020 9:21 pm

Update:

Just took a look at the Forge install process, and I can already see where some of the weirdness people have been talking about (no sound on the Pi) may be coming from, since the default installer is trying to use the LWJGL libraries downloaded by the Minecraft client originally, which are the 3.2.2 version that are compiled for x86_64.

You can tell it from the log output of the classpath:

Code: Select all

/usr/lib/jvm/java-11-openjdk-armhf/bin/java -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path=/home/salawat/.minecraft/versions/1.14.4-forge-28.1.113/1.14.4-forge-28.1.113-natives-758705896268 -Dminecraft.launcher.brand=java-minecraft-launcher -Dminecraft.launcher.version=1.6.93 -cp /home/salawat/.minecraft/libraries/net/minecraftforge/forge/1.14.4-28.1.113/forge-1.14.4-28.1.113.jar:/home/salawat/.minecraft/libraries/org/ow2/asm/asm/6.2/asm-6.2.jar:/home/salawat/.minecraft/libraries/org/ow2/asm/asm-commons/6.2/asm-commons-6.2.jar:/home/salawat/.minecraft/libraries/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar:/home/salawat/.minecraft/libraries/cpw/mods/modlauncher/4.1.0/modlauncher-4.1.0.jar:/home/salawat/.minecraft/libraries/cpw/mods/grossjava9hacks/1.1.0/grossjava9hacks-1.1.0.jar:/home/salawat/.minecraft/libraries/net/minecraftforge/accesstransformers/1.0.1-milestone.0.1+94458e7-shadowed/accesstransformers-1.0.1-milestone.0.1+94458e7-shadowed.jar:/home/salawat/.minecraft/libraries/net/minecraftforge/eventbus/1.0.0-service/eventbus-1.0.0-service.jar:/home/salawat/.minecraft/libraries/net/minecraftforge/forgespi/1.5.0/forgespi-1.5.0.jar:/home/salawat/.minecraft/libraries/net/minecraftforge/coremods/1.0.0/coremods-1.0.0.jar:/home/salawat/.minecraft/libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:/home/salawat/.minecraft/libraries/com/electronwill/night-config/core/3.6.0/core-3.6.0.jar:/home/salawat/.minecraft/libraries/com/electronwill/night-config/toml/3.6.0/toml-3.6.0.jar:/home/salawat/.minecraft/libraries/org/jline/jline/3.12.1/jline-3.12.1.jar:/home/salawat/.minecraft/libraries/org/apache/maven/maven-artifact/3.6.0/maven-artifact-3.6.0.jar:/home/salawat/.minecraft/libraries/net/jodah/typetools/0.6.0/typetools-0.6.0.jar:/home/salawat/.minecraft/libraries/java3d/vecmath/1.5.2/vecmath-1.5.2.jar:/home/salawat/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar:/home/salawat/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar:/home/salawat/.minecraft/libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:/home/salawat/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:/home/salawat/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/salawat/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/salawat/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/salawat/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/salawat/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/salawat/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/salawat/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar:/home/salawat/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/salawat/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/salawat/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/salawat/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/salawat/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/salawat/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/salawat/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/salawat/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/salawat/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/salawat/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/salawat/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/salawat/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/salawat/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/salawat/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/salawat/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/salawat/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/salawat/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/salawat/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:[color=#FF0000]/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2.jar:/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2.jar:/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2.jar:/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2.jar:/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2.jar:/home/salawat/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2.jar[/color]:/home/salawat/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/salawat/.minecraft/versions/1.14.4-forge-28.1.113/1.14.4-forge-28.1.113.jar cpw.mods.modlauncher.Launcher
Adding the -Djava.library.path=/home/<user>/lwjgl3arm32/ like we did for the Optifine, and swapping out those colored classpath references to point to the matching jars in /home/<user>/lwjgl3arm32 should in theory get things running correctly.

Did that change, and cobbled together yonder run script.

Code: Select all

#!/bin/sh
 
#
# 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
MINECRAFT_LOGIN=###############
MINECRAFT_USERNAME=################
MINECRAFT_PASSWORD=################
 
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=/home/<user>/lwjgl3arm32/
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=b61fb8e9-97bf-435f-8354-1feaba0ce734
MINECRAFT_UUID=12345678-1234-1234-1234-123456789abc
MINECRAFT_VERSION=1.14.4-forge1.14.4-28.1.113
 
TWEAK_CLASS=net.minecraftforge.fml.common.launcher.FMLTweaker
 
MINECRAFT_ATOKEN="$(\
curl -k -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 -k -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
#-XX:+UseConcMarkSweepGC 
#-XX:+CMSIncrentalMode
#export LD_DEBUG="all"
/usr/bin/java -Xmx2G -XX:+UseConcMarkSweepGC -XX:-UseAdaptiveSizePolicy -Xmn1G -Djava.library.path=/home/<user>/lwjgl3arm32:/usr/local/lib -Dminecraft.launcher.brand=java-minecraft-launcher -Dminecraft.launcher.version=1.6.89-j -Dorg.lwjgl.system.allocator=jemalloc -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.system.jemalloc.libname=/home/<user>/lwjgl3arm32/libjemalloc.so -cp /home/<user>/.minecraft/libraries/net/minecraftforge/forge/1.14.4-28.1.113/forge-1.14.4-28.1.113.jar:/home/<user>/.minecraft/libraries/org/ow2/asm/asm/6.2/asm-6.2.jar:/home/<user>/.minecraft/libraries/org/ow2/asm/asm-commons/6.2/asm-commons-6.2.jar:/home/<user>/.minecraft/libraries/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar:/home/<user>/.minecraft/libraries/cpw/mods/modlauncher/4.1.0/modlauncher-4.1.0.jar:/home/<user>/.minecraft/libraries/cpw/mods/grossjava9hacks/1.1.0/grossjava9hacks-1.1.0.jar:/home/<user>/.minecraft/libraries/net/minecraftforge/accesstransformers/1.0.1-milestone.0.1+94458e7-shadowed/accesstransformers-1.0.1-milestone.0.1+94458e7-shadowed.jar:/home/<user>/.minecraft/libraries/net/minecraftforge/eventbus/1.0.0-service/eventbus-1.0.0-service.jar:/home/<user>/.minecraft/libraries/net/minecraftforge/forgespi/1.5.0/forgespi-1.5.0.jar:/home/<user>/.minecraft/libraries/net/minecraftforge/coremods/1.0.0/coremods-1.0.0.jar:/home/<user>/.minecraft/libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:/home/<user>/.minecraft/libraries/com/electronwill/night-config/core/3.6.0/core-3.6.0.jar:/home/<user>/.minecraft/libraries/com/electronwill/night-config/toml/3.6.0/toml-3.6.0.jar:/home/<user>/.minecraft/libraries/org/jline/jline/3.12.1/jline-3.12.1.jar:/home/<user>/.minecraft/libraries/org/apache/maven/maven-artifact/3.6.0/maven-artifact-3.6.0.jar:/home/<user>/.minecraft/libraries/net/jodah/typetools/0.6.0/typetools-0.6.0.jar:/home/<user>/.minecraft/libraries/java3d/vecmath/1.5.2/vecmath-1.5.2.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar:/home/<user>/.minecraft/libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:/home/<user>/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:/home/<user>/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar:/home/<user>/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar:/home/<user>/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/<user>/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/<user>/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar:/home/<user>/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar:/home/<user>/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/<user>/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/<user>/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/<user>/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/<user>/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/<user>/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar:/home/<user>/.minecraft/libraries/com/mojang/datafixerupper/2.0.24/datafixerupper-2.0.24.jar:/home/<user>/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar:/home/<user>/.minecraft/libraries/com/mojang/authlib/1.5.25/authlib-1.5.25.jar:/home/<user>/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/<user>/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/<user>/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/<user>/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar:/home/<user>/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar:/home/<user>/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/<user>/.minecraft/versions/1.14.4-forge-28.1.113/1.14.4-forge-28.1.113.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc.jar:/home/<user>/lwjgl3arm32/lwjgl-openal.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl.jar:/home/<user>/lwjgl3arm32/lwjgl-stb.jar:/home/<user>/lwjgl3arm32/lwjgl.jar:/home/<user>/lwjgl3arm32/lwjgl-jemalloc-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-openal-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-opengl-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-glfw-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-stb-natives-linux-arm32.jar:/home/<user>/lwjgl3arm32/lwjgl-natives-linux-arm32.jar:/home/<user>/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar:/home/<user>/.minecraft/versions/1.14.4-forge-28.1.113/1.14.4-forge-28.1.113.jar cpw.mods.modlauncher.Launcher \
--username $MINECRAFT_USERNAME \
    --accessToken "$MINECRAFT_ATOKEN" \
    --uuid "$MINECRAFT_UUID" \
    --version $MINECRAFT_VERSION \
    --userProperties {} \
    --gameDir ~/.minecraft \
    --assetsDir ~/.minecraft/assets \
    --assetIndex $MINECRAFT_VERSION \
    --tweakClass $TWEAK_CLASS \
    --versionType Forge \
    --launchTarget fmlclient \
    --fml.forgeVersion 28.1.113 \
    --fml.mcVersion 1.14.4 \
    --fml.mcpVersion 20190829.143755 2>&1| tee ./run.log
And it seems to have gotten me at least passed any gremlins directly related to LWJGL problems. I just need to figure out what's up with

Code: Select all

Exception in thread "Client thread" [15:06:07] [Client thread/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

[15:06:07] [Client thread/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1059]: 	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
[15:06:07] [Client thread/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1059]: 	... 4 more
[15:06:07] [Client thread/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:648]: Caused by: java.lang.UnsupportedOperationException
...which I'm guessing has something to do with a transformation step I recall watching the installer do, but I know nowhere near enough about yet. More digging required.

EDIT: Fixed it! Got forge booting up with the correct natives and lwjgl classes. Make sure to use JDK 8. JDK11 may let you slip buy with vanilla, but Forge falls over and dies horribly.

Based on logging that I'm seeing it isn't so much a problem that Minecraft isn't even init'ing the sound system, as all the sound events are lacking bindings to sounds to be played. Note:

Code: Select all

[16:08:48] [Client thread/WARN] [minecraft/SoundEngine]: Missing sound for event: minecraft:ambient.cave
...
[16:08:48] [Client thread/WARN] [minecraft/SoundEngine]: Missing sound for event: minecraft:entity.zombie_villager.step
So there is that. As soon as I figure out what's supposed to be responsible for making that binding happen, and gently nudging it back in the right direction, I'll let you know.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sat Jan 11, 2020 6:15 am

Bonus update:

Did some more digging on the Forge sound issue, and I'm starting to understand the asset management better.

As I mentioned in a previous Wall of Text, the assets folder is generally where raw data is stored in games. In this case, that's exactly the stuff I want to get this darn thing utilizing.

A dive into the Forge docs indicates a sounds.jsin file should exist somewhere in the asset file hierarchy under the particular "mod" namespace to which it is relevant.

I extracted the contents of the Forge jar to figure out if all those assets bundled with vanilla were expected to be present within the versions 1.14.4-forge-*.jar. They were not. Even more surprisingly, they were not present in the vanilla 1.14.jar in versions, which honestly surprised me.

Yet nevertheless, they end up on our computers, so the search and experimentation will continue tomorrow.

I hope I'm not clogging up the thread with all these updates... I know it may not be the most interesting subject matter to keep up with, but deep down I really can't help but share the journey for posterity. Unfortunately, got the remnants of a wicked storm hanging around, and a pup who's just not happy about it. Stay safe out there folks.

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

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sat Jan 11, 2020 10:22 am

Salawat, it's all useful info, keep up the good work.

I liked Merekkon5's installer - it may have some useful stuff.

https://www.raspberrypi.org/forums/view ... p?t=245947

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sat Jan 11, 2020 9:24 pm

rpiMike wrote:
Sat Jan 11, 2020 10:22 am
Salawat, it's all useful info, keep up the good work.

I liked Merekkon5's installer - it may have some useful stuff.

https://www.raspberrypi.org/forums/view ... p?t=245947
I hope so.

It's that time again though. UPDATE!

I've figured out the sound/asset mystery.

So apparently the launcher has yet another use, which is the derivation of the asset library. None of the sounds or anything else is part of the published jars that are pulled down. instead, there's a "Resources" step in the launch process that probes the ~/.minecraft/assets folder to make sure everything is there, and if it isn't, pulls it down and stages it in a filesystem indexed by hash value.

If you've taken a look in there before, there are two folders: indexes and objects
The indexes folder eventually leads to a versioned JSON file chock full of hashes, file sizes, and "paths".

If you take note of the hash in that index file, then jump over to the objects directory, and drill down into the folder structure that matches the hash value, you'll find the asset named in the tuple.

If I had to guess; and this is a big fat guess mind, there may be an impedance mismatch if you will between vanilla's system that is aware of this cache, and Forge's system for drilling down into mod directory structures. I don't know for sure, but from what I've seen, it seems to look like any particular mod is expected to have a particular common layout, and the translation between all of Vanilla's resources and that hierarchy may not have been done by anyone yet? That seems very unlikely though unless everyone up until now has been playing a modded minecraft with no sound.

The google foo is failing in the sense that I haven't been able to phrase the question quite right to get an answer already provided for solving the no sound issue, but I at least now know where all the resources are that seem to be missing, have the key file (the index file) to identify what resource path lines up with what hash, so I can use that to guide a transform to get everything where Forge expects it to be.

Now I just need to figure out what that is and we should be golden.

Easy peezy right? <headdesk>

Anyway. Next update may take a while. Going to do some digging into a modding "Hello World" to see if I can at least test which assumptions I'm making hold water.

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sun Jan 12, 2020 3:33 am

BREAKING NEWS: SPECIAL UPDATE

We at Works on my Machine News bring you a special live action report!

Minecraft Forge Client 1.14.4 is actually fully working with sound on Raspberry Pi!

We go now to a developer we've just managed to calm down long enough to interview.

Reporter: "You've managed to get the modding framework working for Minecraft on a computer it clearly was not intended to be supported for! Congratulations! What was your secret?"

Developer: "I cheated."

Reporter: "O-Okay..."

Drama aside I got the bloody thing working. The reason everything wasn't being found?

Code: Select all

[20:37:54] [Client thread/ERROR] [minecraft/ResourceIndex]: Can't find the resource index file: /home/<user>/.minecraft/assets/indexes/1.14.4-forge1.14.4-28.1.0.json
That. The solution?

Code: Select all

cp ~/.minecraft/assets/indexes/1.14.json ~/.minecraft/assets/indexes/1.14.4-forge1.14.4-28.1.0.json
That's it. Music, block sounds, and everything else is working just fine. It's just that the installer from forge forgets to do that little step. Use the run script I posted yesterday, and you should be golden.

Note there will be a 2 gig maximum size due to the 32-bit nature of the JVM you're running with, but if you're judicious about your mod choices, you can indeed run them.

Note you'll be running them without Optifine... I've not taken a look at getting both Optifine and Forge frameworks to work together, and I'm not sure that's on the menu for a little bit; as I can at least get the nephew up and running for the time being with this. Although I'll keep an eye on this thread to provide some support when I can. And rest assured I will be working on getting an AArch64 JVM and dependencies compiled to unlock the full power of the Pi for twice the Minecraft modding capability.

So overall process for install is just as the setup script was originally doing, except
-use the 3.2.3 versions of the lwjgl libraries and natives compiled for arm32
The details of getting those was detailed in a previous post.
-You can either run Optifine with the run script originally posted, or download forge and use the previously posted run script to kick it off after making sure to copy the versioned ResourceIndex file in ~/.minecraft/assets/indexes to ~/.minecraft/assets/indexes

Big thanks to everyone for the scripts to get the initial setup off the ground.
Attached image is the freshly minted Forge world. With the new Flirc case, the world generation process popped processor throttling for barely a second at the end and settled down.

Happy digging everyone.
Attachments
forge.jpeg
Works on my machine!
forge.jpeg (127 KiB) Viewed 3026 times

mtylerb
Posts: 32
Joined: Sat Apr 07, 2018 3:14 am
Location: Warburg, AB, Canada

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Sun Jan 19, 2020 7:10 am

Salawat wrote:
Sun Jan 12, 2020 3:33 am
BREAKING NEWS: SPECIAL UPDATE

We at Works on my Machine News bring you a special live action report!

Minecraft Forge Client 1.14.4 is actually fully working with sound on Raspberry Pi!

We go now to a developer we've just managed to calm down long enough to interview.

Reporter: "You've managed to get the modding framework working for Minecraft on a computer it clearly was not intended to be supported for! Congratulations! What was your secret?"

Developer: "I cheated."

Reporter: "O-Okay..."

Drama aside I got the bloody thing working. The reason everything wasn't being found?

Code: Select all

[20:37:54] [Client thread/ERROR] [minecraft/ResourceIndex]: Can't find the resource index file: /home/<user>/.minecraft/assets/indexes/1.14.4-forge1.14.4-28.1.0.json
That. The solution?

Code: Select all

cp ~/.minecraft/assets/indexes/1.14.json ~/.minecraft/assets/indexes/1.14.4-forge1.14.4-28.1.0.json
That's it. Music, block sounds, and everything else is working just fine. It's just that the installer from forge forgets to do that little step. Use the run script I posted yesterday, and you should be golden.

Note there will be a 2 gig maximum size due to the 32-bit nature of the JVM you're running with, but if you're judicious about your mod choices, you can indeed run them.

Note you'll be running them without Optifine... I've not taken a look at getting both Optifine and Forge frameworks to work together, and I'm not sure that's on the menu for a little bit; as I can at least get the nephew up and running for the time being with this. Although I'll keep an eye on this thread to provide some support when I can. And rest assured I will be working on getting an AArch64 JVM and dependencies compiled to unlock the full power of the Pi for twice the Minecraft modding capability.

So overall process for install is just as the setup script was originally doing, except
-use the 3.2.3 versions of the lwjgl libraries and natives compiled for arm32
The details of getting those was detailed in a previous post.
-You can either run Optifine with the run script originally posted, or download forge and use the previously posted run script to kick it off after making sure to copy the versioned ResourceIndex file in ~/.minecraft/assets/indexes to ~/.minecraft/assets/indexes

Big thanks to everyone for the scripts to get the initial setup off the ground.
Attached image is the freshly minted Forge world. With the new Flirc case, the world generation process popped processor throttling for barely a second at the end and settled down.

Happy digging everyone.
I've never used Forge. What is the advantage? I already get sound on the RPi4's running any version of MJE with just OptiFine.

hydrohyrax8
Posts: 1
Joined: Wed Jan 29, 2020 6:49 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Wed Jan 29, 2020 6:57 pm

Hello… Thanks for this tutorial. I'm stuck on Step #5. Minecraft launches, and I can login (great!). But then I'm just presented with an interface with 3 tabs: Update Notes, Launcher Log, Profile Editor.

There is nowhere to: "Click 'edit profile' and select use release - 'release 1.12.2', then 'save profile'"…

The Profile Editor tab is just blank without entries or any way to add them. What to do?

Salawat
Posts: 19
Joined: Fri Dec 27, 2019 7:58 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Mon Feb 03, 2020 5:10 am

mtylerb wrote:
Sun Jan 19, 2020 7:10 am

I've never used Forge. What is the advantage? I already get sound on the RPi4's running any version of MJE with just OptiFine.
Forge essentially allows for the running of user developed content (I.e. mods). If all you're looking for is the vanilla experience, don't sweat it. You aren't missing much. If you're interested in some community developed content though, Forge is what you'd want to run. The big limitation you'll quickly run into though is the 2 gig memory limit for 32 bit systems. An Aarch64 JDK and dependencies will need to be built and installed to really make use of multiple mods since the assets are all loaded at game startup.
hydrohyrax8 wrote: Hello… Thanks for this tutorial. I'm stuck on Step #5. Minecraft launches, and I can login (great!). But then I'm just presented with an interface with 3 tabs: Update Notes, Launcher Log, Profile Editor.

There is nowhere to: "Click 'edit profile' and select use release - 'release 1.12.2', then 'save profile'"…

The Profile Editor tab is just blank without entries or any way to add them. What to do?
Those should be on the bottom of the window you logged in through. You should have the Play game button in the center bottom of the pane, profile stuff should be on bottom left, version selection of the game to play should be on the bottom right.

verknxt_minecraft
Posts: 3
Joined: Fri Feb 07, 2020 3:10 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Fri Feb 07, 2020 3:11 pm

how to get minecraft 1.8.0 on rpi4? :)

TamaTamaGoGo
Posts: 33
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4 !You should change here!

Tue Feb 11, 2020 2:12 am

Thank you for your scripts, RpiMike! :)
I want to tell everyone about this!

  • You need to change this script

Code: Select all

nano runMC1_12_2_OptifineE3.sh
[Point] If you can’t open runMC1_12_2_OptifineE3.sh, Try

Code: Select all

cd ~.minecraft
Or

Code: Select all

 ./setupMC2.sh
  • You need to change Here!

Code: Select all

  -Xmx650m -Xms650m -Xmn128m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseNUMA -XX:+CMSParallelRemarkEnabled -XX:MaxTenuringThreshold=15 -XX:MaxGCPauseMillis=30 -XX:GCPauseIntervalMillis=150 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -XX:+OptimizeStringConcat -XX:+AggressiveOpts -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:SoftRefLRUPolicyMSPerMB=2000 -XX:ParallelGCThreads=10
------------------------------------------------------------------------------------------------

Change is all!!
Have a fun Minecraft!!
by. TamaTama
Last edited by TamaTamaGoGo on Thu Feb 13, 2020 7:21 am, edited 3 times in total.
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!

TamaTamaGoGo
Posts: 33
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Tue Feb 11, 2020 6:42 am

I found this information!

Change script to this!

Code: Select all

 -Xmx1G -Xms1G -Xmn128m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseNUMA -XX:+CMSParallelRemarkEnabled -XX:MaxTenuringThreshold=15 -XX:MaxGCPauseMillis=30 -XX:GCPauseIntervalMillis=150 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -XX:+OptimizeStringConcat -XX:+AggressiveOpts -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:SoftRefLRUPolicyMSPerMB=2000 -XX:ParallelGCThreads=10
It’s work faster!
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!

adlaitoes
Posts: 1
Joined: Tue Feb 25, 2020 11:12 pm

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Tue Feb 25, 2020 11:19 pm

Thank you so much rpiMike ! Everything worked perfectly and the kiddos are loving it!
I do have a question/request being a noob here. Is there any way to create a sort of executable file to run minecraft? I've built this for my kids to play but going into a dialog window every time won't work for them.
I've waded into the deep end when I'm at kiddie pool-level skills :D

mtylerb
Posts: 32
Joined: Sat Apr 07, 2018 3:14 am
Location: Warburg, AB, Canada

Re: How to setup Minecraft 1.12.2 on Pi3 or Pi4

Wed Feb 26, 2020 1:00 pm

adlaitoes wrote:
Tue Feb 25, 2020 11:19 pm
Thank you so much rpiMike ! Everything worked perfectly and the kiddos are loving it!
I do have a question/request being a noob here. Is there any way to create a sort of executable file to run minecraft? I've built this for my kids to play but going into a dialog window every time won't work for them.
I've waded into the deep end when I'm at kiddie pool-level skills :D
Not an executable, per se. You're looking to make a menu item. Maybe try looking at this article:

https://www.maketecheasier.com/create-d ... ile-linux/

I imcluded a basic one in my 1.14.4 script for the RasPi 4, but that's obviously not going to be helpful in this 1.12.2 installation.

Return to “Gaming”