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

How to setup Minecraft 1.12.1 on Raspberry Pi 3

Wed Jun 21, 2017 2:30 pm

How to setup Full Minecraft 1.12.1 (with Optifine) on Raspberry Pi 3

Edit : 21/8/2017 Added video tutorial link
Edit : 20/8/2017 Updated to 1.12.1, Optifine 1.12.1 HD U C5

Please note :
Do this at your own risk.
If you have any doubts use a spare SD card.
The OpenGL drivers are experimental - they may not work with all screens. If unsure make sure you can ssh onto the Pi from another machine to turn back off.
Most likely to have success with OpenGL drivers if using Raspberry Pi 3 with heatsink, genuine 5.1 volt 2.5 amp power supply with heavy duty 2 core power cable, 1080p screen.
This should also work on the Pi2.

This tutorial was tested using Raspbian Stretch with Desktop - release date 2017-08-16

Video tutorial : https://www.youtube.com/watch?v=yTRYomiQMAY

1 If you need to update an existing version use

Code: Select all

sudo apt-get update && sudo apt-get -y upgrade
If you get any questions or prompts during raspbian update press ‘q’ ‘enter’

2 In Menu\Preferences\Raspberry Pi Configuration :

System Tab - set Splash Screen to Disabled
Performance Tab - set GPU Memory to 64Mb
- if using Pi2 set overclock to High(1000MHz)
Reboot

3 Enable ‘GL Driver’ from a terminal window

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.

4 Install OpenAL Audio & glxgears demo

Code: Select all

sudo apt-get -y install libalut0 libalut-dev && sudo apt-get -y install mesa-utils
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
7 Run launcher :

Code: Select all

cd ~/Minecraft && java -jar Minecraft.jar
Login with Minecraft email and password
If your using a newer Minecraft.jar click 'edit profile' and select use release - 'release 1.12.1', then 'save profile'
Click Play to install game
You will then receive an error
Close launcher

8 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
9 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/ )

10 Download “OptiFine 1.12.1 HD U C5” from http://optifine.net/downloads

11 Install Optifine

Code: Select all

cd ~/Downloads && java -jar OptiFine_1.12.1_HD_U_C5.jar
Click install.

Run launcher

Code: Select all

cd ~/Minecraft && java -jar Minecraft.jar
Select the OptiFine profile and click play. The launcher will crash

12 Copy run script

Code: Select all

cd ~/Minecraft/ && wget https://www.dropbox.com/s/ca37tzxxc9hvsyd/runOptifine1_12_1.sh && sudo chmod +x runOptifine1_12_1.sh
13 Edit runOptifine1_12_1.sh

Update MINECRAFT_LOGIN, MINECRAFT_USERNAME and MINECRAFT_PASSWORD to your own (may need "" for special characters)

14 Start Minecraft from terminal window

Code: Select all

./runOptifine1_12_1.sh
Change options in Minecraft to reduce render chunks to 2, this should avoid running out of memory.
Turn everything down to low in the video settings (and turn on things like fast math)
Suggest running in the default sized window for best performance - full screen may crash.

https://youtu.be/2sREfySmRNU

Hopefully Minecraft should run :P

Some additional Pi tweeks :

Add an additional 16Mb :
Add the following to /boot/config.txt

Code: Select all

total_mem=1024
gpu_mem=64
Test before and after using :

Code: Select all

vcgencmd get_mem arm
vcgencmd get_mem gpu
If your running a 1080p screen drop the resolution down for a larger Minecraft window :
list modes :

Code: Select all

xrandr
and do one-shot resolution setting at runtime with:

Code: Select all

xrandr --output HDMI-1 --mode 1280x720
If you want to attempt getting a new version of Minecraft working :

1 Install required version using java -jar Minecraft.jar - and allow to crash
2 Scroll up in terminal window and find last ../jre/bin/java command, scroll across and find ‘-cp ’, copy this path list until ‘ net.minecraft.launchwrapper.Launch’
3 Paste this text into the cp= in the run.sh script
Last edited by rpiMike on Tue Aug 22, 2017 4:23 pm, edited 9 times in total.

xXRoboBoyXx
Posts: 38
Joined: Sat Feb 04, 2017 3:22 pm

Re: How to setup Full Minecraft 1.12 on Raspberry Pi 3

Wed Jun 21, 2017 4:05 pm

Can't join servers? It said something like this when i tried to join play.outsidercraft.com

Failed to login: Access token cannot be null or empty.
3.141592653589...

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

Re: How to setup Full Minecraft 1.12 on Raspberry Pi 3

Wed Jun 21, 2017 9:14 pm

I spotted an issue in my runOptifine1_12.sh script - MINECRAFT_LOGIN had a typo. I've corrected it and re-tested by connected to play.renmx.com which worked for me.

Edit : just tried play.outsidercraft.com which also worked for me

xXRoboBoyXx
Posts: 38
Joined: Sat Feb 04, 2017 3:22 pm

Re: How to setup Full Minecraft 1.12 on Raspberry Pi 3

Thu Jun 22, 2017 1:11 pm

rpiMike wrote:I spotted an issue in my runOptifine1_12.sh script - MINECRAFT_LOGIN had a typo. I've corrected it and re-tested by connected to play.renmx.com which worked for me.

Edit : just tried play.outsidercraft.com which also worked for me
Awesome! No joke you are the best human ever to live. minecraft on a raspberry pi.


Edit: found the typo. MMINECRAFT_LOGIN I changed it to MINECRAFT_LOGIN and it works now! Thanks (:
3.141592653589...

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

Re: How to setup Full Minecraft 1.12 on Raspberry Pi 3

Sat Jun 24, 2017 5:43 pm

Added some Pi tweeks to the thread - extra 16Mb and change screen res ;)

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jun 26, 2017 6:44 pm

Just went through the steps on my Rpi2, worked like a champ. Thanks for the work on this, I was contemplating doing an updated guide like this myself for 1.12, just never found the time.

However, I would recommend fleshing out step 14 a bit more, as there is no mention on where to get the client token and UUID from (in the launcher_profiles.json in the .minecraft folder).

EDIT: Also, do we need the ASM installation? I don't ever remember needing it before...

xXRoboBoyXx
Posts: 38
Joined: Sat Feb 04, 2017 3:22 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jun 26, 2017 7:54 pm

Sumie wrote:Just went through the steps on my Rpi2, worked like a champ. Thanks for the work on this, I was contemplating doing an updated guide like this myself for 1.12, just never found the time.

However, I would recommend fleshing out step 14 a bit more, as there is no mention on where to get the client token and UUID from (in the launcher_profiles.json in the .minecraft folder).

EDIT: Also, do we need the ASM installation? I don't ever remember needing it before...
I think the ASM Install is because it's not just minecraft, but optifine as well.

Optifine is something that boosts fps. if you didn't know
3.141592653589...

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jun 26, 2017 8:45 pm

xXRoboBoyXx wrote:
Sumie wrote:Just went through the steps on my Rpi2, worked like a champ. Thanks for the work on this, I was contemplating doing an updated guide like this myself for 1.12, just never found the time.

However, I would recommend fleshing out step 14 a bit more, as there is no mention on where to get the client token and UUID from (in the launcher_profiles.json in the .minecraft folder).

EDIT: Also, do we need the ASM installation? I don't ever remember needing it before...
I think the ASM Install is because it's not just minecraft, but optifine as well.

Optifine is something that boosts fps. if you didn't know
Optifine doesn't require it, or hasn't in the very recent past. I don't ever play Minecraft without optifine- even on my PC (been using it since the 1.7.3 beta), but have never installed ASM to get it working.

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 4:06 pm

Just went through the whole install process again on my Rpi3 and skipped the ASM part (step 12) and it worked without a hitch. If we can have an explanation why this would be desired, please elaborate.

Otherwise, having my Rpi3 overclocked modestly (1350mhz CPU, 500mhz GPU+mem)with the new June build of Raspbian, I'm getting near consistent 60-75 fps in Minecraft+Optifine C3.
It's amazing how much better it's gotten over time. I was getting maybe 45-55 fps when I first started testing 6 months ago, and now it's very very playable and smooth.

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

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 4:34 pm

Agreed 'asm' step doesn't seem to be needed - i've removed it and renumbered.

By the way there is no need to get tokens from the launcher_profiles.json file.

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 6:10 pm

How does server authentication happen if we don't need the tokens anymore? Did something change recently?

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

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 6:34 pm

The run... .sh script does 2 calls to mojang servers for authentication and uuid.

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

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 10:11 pm

I'm now able to run Minecraft full screen (1280x720) at about 40fps with some overclocking :)

Image
Last edited by rpiMike on Wed Jun 28, 2017 12:32 pm, edited 1 time in total.

xXRoboBoyXx
Posts: 38
Joined: Sat Feb 04, 2017 3:22 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Tue Jun 27, 2017 10:50 pm

rpiMike wrote:I'm now able to run Minecraft full screen (1280x720) at about 40fps with some overclocking :)

Image
Try 60! Not sure if it counts though... I was looking up in the sky while zooming in.
Attachments
2017-06-27_18.46.20.png
2017-06-27_18.46.20.png (10.82 KiB) Viewed 68489 times
3.141592653589...

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Wed Jun 28, 2017 3:40 pm

Looking at the sky doesn't count. ;)

Usually I judge real world FPS while looking some animated textures and transparencies (like looking at a river with lots of tall grass around) while holding the jump key, and am seeing around 40-55 FPS. It's definitely not bad at all.

EDIT: Also, I only play on fullscreen using 640x480.

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Thu Jun 29, 2017 7:04 pm

For those interested, I have my minecraft config files pasted below if anyone wants to replicate my settings. This helps me so if I redo my Pi3, I don't have to retrace my work, but figured it may be useful for others who want to match the settings I use that seem to work best for me after much tinkering. You can copy the code fields below and overwrite your respective files if you wish to try it out.

/home/pi/.minecraft/options.txt (note: this is assuming fullscreen at 640x480. If your screen cannot handle it, it will probably crash. Change 'fullscreen' from true to false to change it back to windowed.)

Code: Select all

version:1139
invertYMouse:true
mouseSensitivity:0.5
fov:0.0
gamma:0.0
saturation:0.0
renderDistance:2
guiScale:1
particles:1
bobView:true
anaglyph3d:false
maxFps:260
fboEnable:true
difficulty:0
fancyGraphics:false
ao:0
renderClouds:fast
resourcePacks:[]
incompatibleResourcePacks:[]
lastServer:
lang:en_us
chatVisibility:0
chatColors:false
chatLinks:false
chatLinksPrompt:false
chatOpacity:1.0
snooperEnabled:false
fullscreen:true
enableVsync:false
useVbo:true
hideServerAddress:false
advancedItemTooltips:false
pauseOnLostFocus:true
touchscreen:false
overrideWidth:0
overrideHeight:0
heldItemTooltips:false
chatHeightFocused:1.0
chatHeightUnfocused:0.44366196
chatScale:1.0
chatWidth:1.0
mipmapLevels:0
forceUnicodeFont:false
reducedDebugInfo:false
useNativeTransport:true
entityShadows:true
mainHand:right
attackIndicator:1
showSubtitles:false
realmsNotifications:false
enableWeakAttacks:false
autoJump:false
narrator:0
tutorialStep:craft_planks
key_key.attack:-100
key_key.use:-99
key_key.forward:17
key_key.left:30
key_key.back:31
key_key.right:32
key_key.jump:57
key_key.sneak:42
key_key.sprint:29
key_key.drop:16
key_key.inventory:18
key_key.chat:20
key_key.playerlist:15
key_key.pickItem:-98
key_key.command:53
key_key.screenshot:60
key_key.togglePerspective:63
key_key.smoothCamera:0
key_key.fullscreen:87
key_key.spectatorOutlines:0
key_key.swapHands:33
key_key.saveToolbarActivator:46
key_key.loadToolbarActivator:45
key_key.advancements:38
key_key.hotbar.1:2
key_key.hotbar.2:3
key_key.hotbar.3:4
key_key.hotbar.4:5
key_key.hotbar.5:6
key_key.hotbar.6:7
key_key.hotbar.7:8
key_key.hotbar.8:9
key_key.hotbar.9:10
key_of.key.zoom:46
soundCategory_master:1.0
soundCategory_music:1.0
soundCategory_record:1.0
soundCategory_weather:1.0
soundCategory_block:1.0
soundCategory_hostile:1.0
soundCategory_neutral:1.0
soundCategory_player:1.0
soundCategory_ambient:1.0
soundCategory_voice:1.0
modelPart_cape:false
modelPart_jacket:false
modelPart_left_sleeve:false
modelPart_right_sleeve:false
modelPart_left_pants_leg:false
modelPart_right_pants_leg:false
modelPart_hat:false
/home/pi/.minecraft/optionsof.txt

Code: Select all

ofRenderDistanceChunks:2
ofFogType:3
ofFogStart:0.8
ofMipmapType:0
ofOcclusionFancy:false
ofSmoothFps:false
ofSmoothWorld:true
ofAoLevel:0.0
ofClouds:1
ofCloudsHeight:0.0
ofTrees:1
ofDroppedItems:1
ofRain:3
ofAnimatedWater:0
ofAnimatedLava:0
ofAnimatedFire:true
ofAnimatedPortal:true
ofAnimatedRedstone:true
ofAnimatedExplosion:false
ofAnimatedFlame:true
ofAnimatedSmoke:false
ofVoidParticles:false
ofWaterParticles:false
ofPortalParticles:true
ofPotionParticles:true
ofFireworkParticles:false
ofDrippingWaterLava:false
ofAnimatedTerrain:true
ofAnimatedTextures:true
ofRainSplash:false
ofLagometer:false
ofShowFps:true
ofAutoSaveTicks:4000
ofBetterGrass:1
ofConnectedTextures:1
ofWeather:false
ofSky:true
ofStars:true
ofSunMoon:true
ofVignette:1
ofChunkUpdates:1
ofChunkUpdatesDynamic:false
ofTime:0
ofClearWater:false
ofAaLevel:0
ofAfLevel:1
ofProfiler:false
ofBetterSnow:false
ofSwampColors:false
ofRandomMobs:false
ofSmoothBiomes:false
ofCustomFonts:false
ofCustomColors:false
ofCustomItems:false
ofCustomSky:false
ofShowCapes:false
ofNaturalTextures:false
ofLazyChunkLoading:true
ofDynamicFov:true
ofAlternateBlocks:false
ofDynamicLights:3
ofScreenshotSize:1
ofCustomEntityModels:false
ofFullscreenMode:640x480
ofFastMath:true
ofFastRender:true
ofTranslucentBlocks:1
key_of.key.zoom:46
Here's my settings for my Pi3 too, if you really want to know exactly what I'm doing:

/boot/config.txt, added section at the bottom

Code: Select all

dtparam=sd_overclock=100
dtparam=audio=on
arm_freq=1350
sdram_freq=500
core_freq=500
gpu_freq=500
over_voltage=4
dtoverlay=vc4-kms-v3d
gpu_mem=192
I get 60-75 fps and minimal stuttering with these settings. The "dtparam=sd_overclock=100" assumes you have a very high quality SDcard (mine's a Sandisk Extreme Pro) so it will probably cause super corruption if you're using a run-of-the-mill POS card. Remove that line if you're unsure.

WhosChaosTK
Posts: 2
Joined: Sat Jul 08, 2017 12:18 am

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Sat Jul 08, 2017 12:25 am

3 Enable ‘GL Driver’ from a terminal window
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.


This whole thing messes up everything on my pi-top, I enable it and at first everything works fine, but when it comes up with the whole code line thing when it first power on sometimes that glitches out or doesnt even pop up, other apps just break completely to the point they dont launch. But when I turn it off, everything works fine except minecraft, the main menu runs at like 1 FPS and when i get in game i cant get anything more than like 4-5, but when that GL (Full KMS) setting is on it runs at 30 fps as if i was playing on a pc, can anyone give advice, because i dont know if i did something wrong or if its the pi-tops so if someone could tell me that would be amazing!!! Because the minecraft pi that they put on this is garbage its minecraft pe 0.1.1 so its bad and I would love to play the latest so if someone could help me that would be amazing!

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

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Sat Jul 08, 2017 12:43 pm

The GL Driver is still experimental as far as I am aware. Minecraft requires this driver for OpenGL hence 30fps with it on, 1fps with it off. Other apps may not like the GL driver turned on. You could try the GL Fake KMS option other apps may work better.

tegsirat
Posts: 8
Joined: Fri Apr 08, 2016 1:45 am

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Sat Jul 15, 2017 8:50 pm

This is awesome!

I'm trying to take this yet a step further, but keep getting frustrated. What i'm trying to do is set up a headless login on my Pi that i can access via VNC for AFK'ing and the like.

This works great when i have an HDMI cable plugged in; I VNC in, fire up the client, connect to my server, and AFK until the cows come home.

Trouble is, when i try running the client with no HDMI cable attached, it crashes. i've tried a few different UID plugs, with no results. Anybody know how to fool OpenGL into thinking it has a monitor attached so it won't freak out when i try to launch the client?

Sumie
Posts: 49
Joined: Tue Oct 18, 2016 2:03 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jul 17, 2017 2:31 am

So you want to run Minecraft on the PI through VNC while on your PC?

Why don't you just... play it on your PC?

africalinguist
Posts: 1
Joined: Mon Jul 17, 2017 7:19 am

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jul 17, 2017 7:32 am

ok i'm trying to install optifine. i press install and BOOM. "Error Minecraft version 1.12 not found. you need to start the version 1.12 manually once." there is no 1.12.jar in the .minecraft/versions/1.12 folder. only 1.12.json. do you know what im doing wrong?

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

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Mon Jul 17, 2017 9:03 am

Did you do step 7 'run launcher' before installing optifine ?

Zeusxl60
Posts: 7
Joined: Wed Jul 19, 2017 3:02 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Wed Jul 19, 2017 3:05 pm

Has anyone been able to run mods, and if so how

Thanks for the help.

xXRoboBoyXx
Posts: 38
Joined: Sat Feb 04, 2017 3:22 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Wed Jul 19, 2017 9:10 pm

Zeusxl60 wrote:Has anyone been able to run mods, and if so how

Thanks for the help.
Just a guess, But i think you should be able to install forge, Edit the run.sh file to launch forge (Bottom of tutorial shows how to run other versions) and install mods. I Haven't tried this, but it should work.
3.141592653589...

Zeusxl60
Posts: 7
Joined: Wed Jul 19, 2017 3:02 pm

Re: How to setup Minecraft 1.12 on Raspberry Pi 3

Wed Jul 19, 2017 9:29 pm

I tried, but it doesn't seem to run Forge.

Return to “Gaming”