User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Fri May 03, 2019 11:10 am

First off before we start, I want to thank RpiMike for making this possible.

Minecraft 1.12.2 + Optfine has sound. :)

Minecraft 1.12.2 + Forge does not have any sound. I have no idea how to fix it. :?

Tutorial on my website:
https://html.dynu.net/index.php/how-to- ... on-1-12-2/

Requirements:

Raspberry Pi 2B, 3B or 3A+


Update of OS and preparation for installation:

Update your Raspbian operating system to the latest version.

Code: Select all

sudo apt-get install update && sudo apt-get upgrade -y
Open the Raspberry Pi configuration application from Menu, Preferences, Raspberry Pi configuration.

Disable splashscreen, set GPU memory to 100 MB and if you are using a Raspberry Pi 2B, overclock to 1000 mhz (High).
Save the settings.

Open a new terminal window.

Code: Select all

sudo raspi-config
Scroll and select advanced options, GL driver, and enable Fake KMS.
Reboot.

Testing to see if drivers are active:

Open a terminal window:

Code: Select all

sudo apt-get -y install libalut0 libalut-dev && sudo apt-get -y install mesa-utils
Test the driver by opening a new window and typing

Code: Select all

glxgears
.
Glxgears should run around 60 fps. If you are getting hugely different values, try re-enabling the GL driver or test with the full KMS driver.

Downloading and installation of Minecraft:

Download:

Code: Select all

mkdir ~/Minecraft; mkdir ~/Minecraft/Natives; cd ~/Minecraft && wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
Running the Minecraft launcher:

Code: Select all

cd ~/Minecraft && java -jar Minecraft.jar
Log in with your Minecraft credentials.

Click ‘Edit profile’ and select the ‘1.12.2’ release.

Click save, and then play.

The game will output an error and crash. This is completely normal. Exit the launcher.

Downloading 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
Updating 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
'
Download Forge 14.23.4.2713 installer (This Forge version is specific, some versions don’t work): https://files.minecraftforge.net/

Download Optifine HD_U_C5(Same as Forge, only certain versions work.):

Code: Select all

cd ~/Downloads && wget https://www.dropbox.com/s/0mjy5btnyr7v75g/OptiFine_1.12.2_HD_U_C5.jar
Copy run script for Optifine:

Code: Select all

cd ~/Minecraft/ && wget https://www.dropbox.com/s/4aj6rr26p0kib0l/runOptifine1_12_2.sh && sudo chmod +x runOptifine1_12_2.sh
Open the script in a text editor (don’t run it) and edit “EmailHere“, “UsernameHere” and “PasswordHere” to your Minecraft account details.

Save the file.

Install Optifine.

Code: Select all

cd ~/Downloads && java -jar OptiFine_1.12.2_HD_U_C5.jar
Run the Minecraft launcher again.

Code: Select all

cd ~/Minecraft && java -jar Minecraft.jar
Click edit profile, choose the Optifine profile, save and play. The game will crash once again.

To install Forge, skip to “Installing Forge” otherwise stay here if you want to only play Minecraft with Optifine (no other mods).

Run the runOptifine1_12_2.sh script:

Code: Select all

cd ~/Minecraft && ./runOptifine1_12_2.sh
Minecraft with Optifine should now open. Configure Optifine to get better FPS. Lower your render distance, turn on fast math, disable particles.

Installing Forge(Optional):
Once again. Minecraft with Forge on Raspberry Pi does not output any sound.

Run the Forge Installer:

Code: Select all

cd ~/Downloads/ && java -jar forge-1.12.2-14.23.4.2713-installer.jar
Install to the default location.

Reopen the Minecraft launcher:

Code: Select all

cd ~/Minecraft && java -jar Minecraft.jar
Open the profile for Forge. Choose the forge 1.12.2 profile, save and click play. The game will crash.

Download the Forge script:

Code: Select all

cd ~/Minecraft/ && wget https://www.dropbox.com/s/eefleliwpyuwqk3/runForge1.12.sh && chmod +x runForge1.12.sh
Edit the runForge1.12.sh script: “enter EMAIL for account here”, “enter USERNAME for account here” and “enter PASSWORD for account here” with your Minecraft account details.

Save.

Run Forge.

Code: Select all

cd ~/Minecraft/ && ./runForge1.12.sh
If Forge boots up fine, quit Minecraft, open up the mods folder for Forge and copy paste the Optifine.jar file in your Downloads section to it.


Hope you successfully installed Minecraft. :)
Last edited by DarkPlatinum on Sat Aug 03, 2019 2:08 pm, edited 2 times in total.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge

Fri May 03, 2019 3:12 pm

avensis wrote:
Fri May 03, 2019 2:27 pm
Thank you very much for sharing this tutorial, it is very well explained :)
Not a problem :) I did not see anyone who made a tutorial with forge so I decided to make my own. Part of the stuff is copied from rpiMike's tutorial, but I have edited the runScripts to allow Minecraft 1.12.2 Optifine and Forge.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

Wesman266373
Posts: 1
Joined: Wed Apr 18, 2018 10:11 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B or later

Sun May 19, 2019 2:03 pm

so I was trying to run it with Minecraft 1.8.9 but it doesn't seem to work, can someone help me?

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B or later

Tue May 21, 2019 8:14 am

This was made for 1.12.2. You could edit the cp= command for 1.8.9 like in rpiMike's post, but you would not have multiplayer functionality. You would also have to personally test the version of forge that works.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

Nexus_Loa
Posts: 1
Joined: Sat Jul 13, 2019 9:01 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B or later

Sat Jul 13, 2019 9:08 pm

So here is my problem,
Today I tried installing minecraft on my Raspberry Pi 3 B+ and I got an error. It seemed normal except for the fact that the launcher would not reopen. I kept following the steps with everything seeming normal until I tried for real, opening up minecraft. Everything looked normal till I saw this error - ./runOptifine1_12_2.sh: 52: ./runOptifine1_12_2.sh: /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java: not found. I have no idea what to do, can someone please help!

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

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B or later

Tue Jul 16, 2019 10:42 am

I suspect you are using Raspbian Buster which doesn’t have Oracle Java installed by default.

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B or later

Tue Jul 16, 2019 1:54 pm

You would need to reinstall java onto raspbian buster. RpiMike should be able to give you the command :)
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sat Aug 03, 2019 2:09 pm

Could someone test this on a Pi 4? Thanks :mrgreen:
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

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

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sat Aug 03, 2019 6:41 pm

This older tutorial won't work by itself now that Raspbian no longer includes JDK 8 preinstalled. The new thread supersedes this one. rpiMike's updated script there takes care of downloading and unpacking Java.

Many users have run that on a Pi 4.

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Aug 04, 2019 11:53 am

jdonald wrote:
Sat Aug 03, 2019 6:41 pm
This older tutorial won't work by itself now that Raspbian no longer includes JDK 8 preinstalled. The new thread supersedes this one. rpiMike's updated script there takes care of downloading and unpacking Java.

Many users have run that on a Pi 4.
Hmm... Too bad I don't have a pi 4 :cry: Let me see if I can edit his script and add forge to it.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

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

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Aug 04, 2019 2:31 pm

Hey DarkPlatinum, sorry I had assumed by the title this was one of rpiMike's earlier threads, but now I see in the first post it's maintaining the tutorial on your website which includes Forge support. Yeah, you'd certainly want to get that updated.

The main difference between a Pi 4 and the earlier models is that a Pi 4 requires Buster, then once people are forced to move to Buster that changes other things like lacking any preinstalled JDK 8. If you can modify and verify your procedure to work on Buster with your Pi 3B+, it will then work on Buster with a Pi 4B.

One way to revise your steps would be to replace everything with the new setupMC* magic scripts, but that would lose some benefits of your blog post which is providing insight into the process. Alternatively, you could keep your sequence the same but add a part at the top to install Java 8 manually. It'll take 6 lines, just take a look at setupMC1.sh particularly the commented-out part with running update-alternatives and don't forget to call update-alternatives --config (see discussion in linked thread).

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Mon Aug 05, 2019 5:48 am

Thank you for the information jdonald. I have taken a look at rpiMikes setupMC1.sh script and it will be easily editable to add forge. If all goes to planned (have to add swap and possibly zram) then I will go ahead and update the forge version all together.

Personally I think it would look cool if I could bundle everything in one script and let the script do most/all of the work but I probably am not allowed to use wget to download forge as the forge site uses ads to keep their web servers up.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

mainmachineispi
Posts: 1
Joined: Sat Sep 07, 2019 12:46 am

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sat Sep 07, 2019 12:53 am

First run of the forge setup script, I tried reinstalling but still got the same thing

Code: Select all

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   302  100   126  100   176    405    565 --:--:-- --:--:-- --:--:--   974
todays access token = you shouldn't need it
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    14  100     2  100    12      9     57 --:--:-- --:--:-- --:--:--    67
MINECRAFT_UUID=
Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[17:42:15] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:42:15] [main/ERROR]: Unable to launch
java.lang.ClassNotFoundException: net.minecraftforge.fml.common.launcher.FMLTweaker
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106) ~[launchwrapper-1.12.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_211]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_211]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:98) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

Xwing1O1
Posts: 4
Joined: Fri Aug 16, 2019 10:15 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Sep 15, 2019 2:40 am

DarkPlatinum wrote:
Sat Aug 03, 2019 2:09 pm
Could someone test this on a Pi 4? Thanks :mrgreen:
I just did the final Forge steps on a Pi4 (4GB) (optifine and mc already installed)

Forge does not load, but above that it should work (since optifine does, at least, run)

In the terminal window at the final launch step (all good before that btw):

Code: Select all

Java HotSpot(TM) Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[20:33:41] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[20:33:41] [main/ERROR]: Unable to launch
java.lang.ClassNotFoundException: net.minecraftforge.fml.common.launcher.FMLTweaker
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106) ~[launchwrapper-1.12.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_211]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_211]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:98) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	pi@raspberrypi:~/Minecraft $
P.s/edit: I downloaded forge directly from the site, and got the exact version mentioned in the install command, if that makes a difference.
"Then the girl from the small town, took off the Old Town, put on a little hank Junior (Thank God)"
-Blake Sheldon and Trace Atkins, 2019
"He's a high-tech, redneck; Mayfield, meets Star Trek"
-George Jones, 1993

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Tue Sep 17, 2019 9:52 am

Unfortunately, this method is broken since buster has been released. I haven't gotten around to fixing it yet.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

Snapwhiz914
Posts: 8
Joined: Sat Sep 14, 2019 5:38 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sat Sep 21, 2019 7:51 pm

Hi DarkPlatinum,
I can't find the forge version specified on your tutorial on the forge website. Did they discontinue it?

Xwing1O1
Posts: 4
Joined: Fri Aug 16, 2019 10:15 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Sep 22, 2019 1:00 pm

Snapwhiz914 wrote:
Sat Sep 21, 2019 7:51 pm
Hi DarkPlatinum,
I can't find the forge version specified on your tutorial on the forge website. Did they discontinue it?
Found the link for you :)
https://files.minecraftforge.net/maven/ ... taller.jar

And,
I'm trying an alternative install of mc+optifine+forge for the pi4, Ill come back and make a tutorial (or something) if it turns out to work. :idea:
"Then the girl from the small town, took off the Old Town, put on a little hank Junior (Thank God)"
-Blake Sheldon and Trace Atkins, 2019
"He's a high-tech, redneck; Mayfield, meets Star Trek"
-George Jones, 1993

Snapwhiz914
Posts: 8
Joined: Sat Sep 14, 2019 5:38 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Sep 22, 2019 1:37 pm

Thank You!

I am making a portable MInecraft player with this and need to use a controller mod.

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Tue Oct 15, 2019 5:07 pm

Whoops... Haven't been on the forums for some number of months... been busy..
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

choubidou13
Posts: 2
Joined: Mon Jun 10, 2019 8:26 pm

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Tue Nov 05, 2019 9:18 pm

Xwing1O1 wrote:
Sun Sep 15, 2019 2:40 am
I just did the final Forge steps on a Pi4 (4GB) (optifine and mc already installed)

Forge does not load, but above that it should work (since optifine does, at least, run)
you have to edit (ie : replace 5.2838 with 4.2713) the forge run script, it is made for 5.2838 but the tutorial says to install 4.2713

darkplat plz fix

DatIrishBoiOHe
Posts: 1
Joined: Sun Nov 10, 2019 8:03 am

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Nov 10, 2019 8:05 am

When I try to use the last line of code it comes out as an error.

./runForge1.12.sh: 53: ./runForge1.12.sh: /opt/jdk/jdk1.8.0_211/bin/java: not found

Does anyone have any suggestions on how to fix this?

User avatar
DarkPlatinum
Posts: 849
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: How to setup Minecraft 1.12.2 + Optifine + Forge On a Raspberry Pi 2B, 3B, 3B+ (Untested on Pi 4B)

Sun Nov 10, 2019 4:52 pm

DatIrishBoiOHe wrote:
Sun Nov 10, 2019 8:05 am
When I try to use the last line of code it comes out as an error.

./runForge1.12.sh: 53: ./runForge1.12.sh: /opt/jdk/jdk1.8.0_211/bin/java: not found

Does anyone have any suggestions on how to fix this?
The Raspbian Buster Release has uninstalled the previous version of java. Try and use RpiMike's script. Edit it to run forge.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

Return to “Gaming”