How to setup Minecraft 1.8.9 on RaspPi2


335 posts   Page 1 of 14   1, 2, 3, 4, 5 ... 14
by rpiMike » Tue Feb 23, 2016 7:54 pm
New Minecraft 1.12 thread (21/07/17) :

https://www.raspberrypi.org/forums/view ... 8&t=186547

New simplified tutorial (22/04/16) :

Tutorial Video : https://www.youtube.com/watch?v=EVpGh0zFInM

1 Make sure you have the latest Raspbian Jessie :
Code: Select all
sudo apt-get update && sudo apt-get -y upgrade
2 In Menu\Preferences\Raspberry Pi Configuration :

Set overclock to High(1000MHz) (for Pi2, ignore for Pi3)
Set GPU memory to 64Mb
If your using Pixel - disable the Splash Screen
Reboot

3 Install the experimental OpenGL Driver, sound & glxgears demo
Code: Select all
sudo apt-get -y install xcompmgr libgl1-mesa-dri && sudo apt-get -y install libalut0 libalut-dev && sudo apt-get -y install mesa-utils
4 Enable ‘GL Driver’
Code: Select all
sudo raspi-config
This will start the config utility. Select 'Advanced Options', then select 'GL Driver', then select 'Enable' (latest utility requires selection of 'GL (Full KMS)' ), then select 'Yes' to reboot and enable the driver.

5 Test driver using glxgears
Code: Select all
glxgears
This should run at about 60 fps.

6 Download Minecraft
Code: Select all
mkdir ~/Minecraft; mkdir ~/Minecraft/Natives; cd ~/Minecraft && wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
7a Install launcher :
Code: Select all
java -jar Minecraft.jar
Login with Minecraft email and password

If you've got the latest Minecraft.jar click 'edit profile' and select use release - 'release 1.8.9', then 'save profile'
Click Play to install game
You will then receive an ‘Unsatisfied link error’
Close launcher

7b Copy libraries
Code: Select all
cd ~/Minecraft/Natives && wget https://www.dropbox.com/s/4oxcvz3ky7a3x6f/liblwjgl.so && wget https://www.dropbox.com/s/m0r8e01jg2og36z/libopenal.so
8 Update lwjgl
Code: Select all
cd ~/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209 && rm lwjgl-2.9.4-nightly-20150209.jar; wget https://www.dropbox.com/s/mj15sz3bub4dmr6/lwjgl-2.9.4-nightly-20150209.jar
( based on Roger Allen's tutorial : http://rogerallen.github.io/jetson/2014 ... etson-tk1/ )
9 Copy run script
Code: Select all
cd ~/Minecraft/ && wget https://www.dropbox.com/s/jkhr58apwa7pt1w/run.sh && sudo chmod +x run.sh
10 Edit run.sh, update MINECRAFT_LOGIN, MINECRAFT_USERNAME and MINECRAFT_PASSWORD (may need "" for special characters) to your own
11 From Terminal use ./run.sh

Change options in Minecraft to reduce render chunks to 2, this should avoid running out of memory.

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

Hopefully Minecraft should run :P


Old Tutorial for reference :

Make sure you have the latest Raspbian Jessie :

sudo apt-get update
sudo apt-get upgrade
(was using 'sudo apt-get dist-upgrade' but caused problems with 18/3 Raspbian Jessie)
sudo apt-get install raspi-gpio

Add the experimental GL driver :

sudo apt-get install xcompmgr libgl1-mesa-dri

In Raspberry Pi Configuration :

Set overclock to High(1000)
Set GPU memory to 128Mb

Using ‘sudo raspi-config’ from terminal :

Enable ‘AA GL Driver’
You must now reboot to enable the driver.


Check OpenGL is working :

sudo apt-get install mesa-utils
glxgears (should run at approx 60 fps)

Download Minecraft :

https://minecraft.net/download
download minecraft.jar (under show all platforms)

mkdir ~/Minecraft
mkdir ~/Minecraft/Natives
mv ~/Downloads/Minecraft.jar ~/Minecraft
cd ~/Minecraft

Install launcher :

java -jar Minecraft.jar

Login with Minecraft email and password

If you've got the latest Minecraft.jar click 'edit profile' and select use release - 'release 1.8.9', then 'save profile'
Click Play to install game
You will then receive an ‘Unsatisfied link error’
Close launcher

Update lwjgl in Minecraft :

Replace /home/pi/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar with :
http://orienteer.webspace.virginmedia.com/minecraft/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar

Replace /home/pi/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar.sha with :
http://orienteer.webspace.virginmedia.com/minecraft/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar.sha

Download 2 libraries to ~/Minecraft/Natives :
http://orienteer.webspace.virginmedia.com/minecraft/liblwjgl.so
http://orienteer.webspace.virginmedia.com/minecraft/libopenal.so

Save run.sh to ~/Minecraft :
http://orienteer.webspace.virginmedia.com/minecraft/run.sh
chmod +x run.sh
Edit run.sh, update MINECRAFT_LOGIN, MINECRAFT_USERNAME and MINECRAFT_PASSWORD to your own
From Terminal use ./run.sh

( based on Roger Allen's tutorial :
http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/ )

The following should get the sound working :

sudo apt-get install libalut0 libalut-dev

Change options in Minecraft to reduce render chunks to 2, this should avoid running out of memory.

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

Hopefully Minecraft should run :P
Last edited by rpiMike on Mon Jun 26, 2017 6:31 am, edited 15 times in total.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by KiwiKid » Mon Feb 29, 2016 6:00 pm
Thanks for this write up & YouTube video!

Couple of questions:

1. Can you give details of the LWGL build/where those custom versions came from?

2. How stable is this if you turn all the visual details etc down?
Posts: 2
Joined: Mon Oct 01, 2012 11:19 pm
by EricSander » Tue Mar 01, 2016 6:06 pm
Super, it works. Thank you for sharing this with us.
In the run.sh script i hat to put my password in "", because it contains some special characters which the script didn't like.
Next I will try to run 1.9 ;)
Posts: 1
Joined: Tue Mar 01, 2016 5:59 pm
by rpiMike » Tue Mar 01, 2016 8:28 pm
KiwiKid, I've added a link to the lwjgl build instructions that I used. I only reduced chunks to 2 and reduced sky detail, I've run it for about 4 hours without any issues.

Eric, thanks for the reply, glad it worked.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by Sindybad » Tue Mar 01, 2016 8:31 pm
I have worked out how to install the OptiFine mod :D
Runs on average at a good 20 frames per second :o


How to install the OptiFine mod for better performance:
Assuming you have completed the tutorial above(and installed Minecraft 1.8.9):

Go to http://optifine.net/downloads
And download “OptiFine 1.8.9 HD U H3”

Go to your downloads
Code: Select all
cd ~/Downloads

And run optifine installer
Code: Select all
java -jar OptiFine_1.8.9_HD_U_H3.jar

Click install.

Now launch Minecraft
Code: Select all
cd ~/Minecraft
java -jar Minecraft.jar

Select the OptiFine profile and click play. The launcher will crash

Install asm:
Code: Select all
cd ~/Minecraft
mkdir Libraries
cd Libraries

Download asm-5.0.4-bin.zip from http://forge.ow2.org/project/showfiles. ... se_id=5660
Move it to the Libraries folder
Code: Select all
cd ~/Minecraft/Libraries
mv ~/Downloads/asm-5.0.4-bin.zip .

Unzip it
Code: Select all
unzip asm-5.0.4-bin.zip



Now download my updated run.sh:
Code: Select all
cd ~/Minecraft
wget https://www.dropbox.com/s/0r5trow18vi5vls/runOptifine.sh?dl=1 -O runOptifine.sh


Fill runOptifine.sh with your Minecraft login details
Edit MINECRAFT_LOGIN, MINECRAFT_USERNAME, MINECRAFT_PASSWORD and MINECRAFT_UUID:
Code: Select all
nano runOptifine.sh


Change permissions of file:
Code: Select all
chmod 700 runOptifine.sh


Now run it:
Code: Select all
./runOptifine.sh


When Minecraft has launched, turn everything down to low in the video settings (and turn on things like fast math)
Close Minecraft(It might crash if you open a world now)
And relaunch it:
Code: Select all
./runOptifine.sh



Thanks for reading!
P.S. rpiMike, you can include this in the original post if you want
Last edited by Sindybad on Wed Mar 02, 2016 1:56 pm, edited 1 time in total.
Posts: 3
Joined: Tue Mar 01, 2016 8:29 pm
by Malman35 » Wed Mar 02, 2016 3:12 am
Do you have to buy minecraft or is it free the way you said? Sounds cool though. :)
For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return - Leonardo da Vinci

Check out my cool website for my stop motion animations.
www.mem3500films.ml
User avatar
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am
Location: Hokkiado, Japan
by rpiMike » Wed Mar 02, 2016 8:31 am
You need to have at least have bought the Minecraft PC/Mac/Linux version from http://www.Minecraft.net, currently UK £17.95. This will get you a minecraft login which is required for use on the Pi.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by Sindybad » Wed Mar 02, 2016 4:18 pm
Malman35 wrote:Do you have to buy minecraft or is it free the way you said? Sounds cool though. :)

You can play Minetest for free if you want: https://forum.minetest.net/viewtopic.php?f=3&t=3837
I have tested it on the raspberry pi and it works
Posts: 3
Joined: Tue Mar 01, 2016 8:29 pm
by willmarks1984 » Fri Mar 04, 2016 9:54 am
Sorry for the silly question, but will these instructions work for a Raspberry Pi 3?
Trying my best to learn programming with the Pi.
Posts: 4
Joined: Mon Dec 21, 2015 9:56 am
Location: Northern Ireland
by rpiMike » Fri Mar 04, 2016 5:40 pm
Yes, I have this working on a Raspberry Pi 3
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by ConradG13 » Sat Mar 05, 2016 12:10 am
Sorry, how do I get the java launcher? when I open a folder, there are no programs to run it on.
People who say times instead of multiply shouldn't be around.
Posts: 50
Joined: Thu Feb 25, 2016 1:41 am
by rpiMike » Sat Mar 05, 2016 2:08 pm
ConradG13 wrote:Sorry, how do I get the java launcher? when I open a folder, there are no programs to run it on.


Once you've downloaded Minecraft.jar and placed it in the ~/Minecraft folder you should then type

java -jar Minecraft.jar

this should run the Minecraft launcher
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by SamDoesPi » Sat Mar 05, 2016 5:31 pm
willmarks1984 wrote:Sorry for the silly question, but will these instructions work for a Raspberry Pi 3?

It should be faster on the RPi 3 as it is the latest model.
Posts: 58
Joined: Tue Feb 16, 2016 6:36 pm
by rpiMike » Sat Mar 05, 2016 6:47 pm
Running on the Raspberry Pi 3 :

https://youtu.be/GXFMo8psp-U

Using Optifine achieving about 30 fps, thanks Sindybad
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by CockPitt » Sat Mar 05, 2016 10:03 pm
Great job. Minecraft running on the Raspberry Pi 3 looks pretty smooth. Very impressive. Is it possible to connect to servers with the Pi?
Posts: 107
Joined: Tue Jun 02, 2015 1:29 pm
by rpiMike » Sun Mar 06, 2016 7:11 pm
Yes, it is possible to connect to Minecraft servers.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by Glitch_head » Tue Mar 08, 2016 3:51 am
How is the progress on getting it to work with 1.9? Is the performance worse or better in multiplayer?
Also could you build a preset image with everything setup on it? Im really interested in these 3 questions would love if you could answer them thanks!
Posts: 2
Joined: Mon Mar 16, 2015 12:03 am
by ChickenPillow » Fri Mar 11, 2016 4:52 pm
Hello, Ive managed to set up minecraft and can play perfectly. The problem is there is no sound, in the Terminal thing it says it cant find the sound. How do I fix this? The video i saw had sound working and its not my pi, just minecraft. Thanks.
Posts: 13
Joined: Thu Mar 10, 2016 9:06 pm
by MicahTheManiac » Sat Mar 12, 2016 10:43 pm
I've looked online to see if overclocking a Raspberry Pi at 1000 is safe. I found a bunch of stuff i don't understand, i have never overclocked anything before. When I go into the config it says overclocking could damage my Pi, so is overclocking at 1000 safe? If it isn't how long can my Pi run with it on and how can I reset it.
Posts: 2
Joined: Sat Mar 12, 2016 10:34 pm
by rpiMike » Sun Mar 13, 2016 7:57 pm
ChickenPillow wrote:Hello, Ive managed to set up minecraft and can play perfectly. The problem is there is no sound, in the Terminal thing it says it cant find the sound. How do I fix this? The video i saw had sound working and its not my pi, just minecraft. Thanks.


I think this should fix the sound :

sudo apt-get install libalut0 libalut-dev
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by rpiMike » Sun Mar 13, 2016 8:04 pm
MicahTheManiac wrote:I've looked online to see if overclocking a Raspberry Pi at 1000 is safe. I found a bunch of stuff i don't understand, i have never overclocked anything before. When I go into the config it says overclocking could damage my Pi, so is overclocking at 1000 safe? If it isn't how long can my Pi run with it on and how can I reset it.


Yes, overclocking the Raspberry Pi 2 to 1000 MHz is safe.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by rpiMike » Sun Mar 13, 2016 10:33 pm
Glitch_head wrote:How is the progress on getting it to work with 1.9? Is the performance worse or better in multiplayer?
Also could you build a preset image with everything setup on it? Im really interested in these 3 questions would love if you could answer them thanks!


1.9 seems too intensive for the Pi 3. It does start but constantly reports - can't keep up. May have to wait for Optifine to be updated to 1.9.
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by rpiMike » Mon Mar 14, 2016 6:24 pm
Short video of Minecraft 1.9 on Raspberry Pi 3 :

https://www.youtube.com/watch?v=FuuXFvkrxDo
User avatar
Posts: 180
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK
by cada » Wed Mar 16, 2016 11:11 pm
1.9? great :) I think I'll need to get a heatsink for our pi3. The CPU gets finger burningly hot during a minecraft session. Also sound started working after I installed the Optifine stuff.
Posts: 1
Joined: Wed Mar 16, 2016 11:06 pm
by alguien » Tue Mar 22, 2016 4:25 pm
I cant enable opengl. if i enable it i dont see anything on the screen. Why is this? Im using a raspberry pi 2
Last edited by alguien on Wed Mar 23, 2016 8:38 am, edited 2 times in total.
Posts: 2
Joined: Tue Mar 22, 2016 4:20 pm