User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Thu May 28, 2020 2:41 am

When I first got my Raspberry Pi, I played Minecraft Pi. It was really fun, except for the fact that it had no Survival. So I"ll show you how to get Minecraft-Pi Survival mode working on your Pi. One of the things I wanted to mention is that you can't hit mobs, and there is no nighttime, so you have to be a bit creative with how you kill mobs, because hostile mobs will still spawn in dark spaces. With these things in mind, you mine as well get started.
So your first step is to download Minecraft-Pi. On most Raspbian Images it comes preinstalled, but if it isn't, open a terminal and type:

Code: Select all

sudo apt install minecraft-pi
Now that it's installed, you can play around in creative, but there is still no survival, so your second step would be to go to https://dropbox.com/s/iutdy9yrtg3cgic/survival.bsdiff, and download the file located there.
Your third step is to install something called bsdiff. You can do that the following way:

Code: Select all

sudo apt install bsdiff
Your fourth step is to get into the Minecraft-Pi directory (/opt/minecraft-pi). So to do that, type the following:

Code: Select all

cd /opt/minecraft-pi
Your fifth step is to patch the survival patch to Minecraft Pi:

Code: Select all

sudo bspatch minecraft-pi survival ~/Downloads/survival.bsdiff
Now that you've created your patch, for your fifth step you need to make the Minecraft-Survival patch executable:

Code: Select all

sudo chmod +x survival
Now that it's executable, you need to create a second executable to determine which GL it uses to boot:

Code: Select all

sudo nano /usr/bin/survival
Input this text into nano:

Code: Select all

#!/bin/sh

cd /opt/minecraft-pi || exit

if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status \
	/proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null; then
	export LD_PRELOAD=libbcm_host.so.1.0
	export LD_LIBRARY_PATH=lib/mesa
else
	export LD_LIBRARY_PATH=lib/brcm
fi

./survival
Hit CTRL-X to exit, and save changes (to save changes: y, ENTER, ENTER)
Now you have to make this an executable file:

Code: Select all

sudo chmod +x /usr/bin/survival
You also need to make sure that libgles2 is installed:

Code: Select all

sudo apt install libgles2

Code: Select all

sudo apt install libgles2-mesa

Code: Select all

sudo apt install libgles2-mesa-dev
Now you can either do 1 of 2 things:
  • Continue my instructions to make a menu item for this game
To make a menu item, you need to open the Main Menu Editor from the main menu, preferences, main menu editor.
If you do not have the main menu editor, type

Code: Select all

sudo apt install mozo
into the terminal.
To run mozo, simply type

Code: Select all

mozo
into the terminal.
Now that your menu editor is open, on the left side of the menu editor, click games.
Now on the right side of the menu editor, click new item
Call it whatever you want, just as long as you can remember that it is the menu item for Minecraft Survival.
Under command, type survival.
To get the Minecraft image, click on image.
To the left, select other (It might say a number of things after "other")
Select usr.
Select share.
Select pixmaps.
Select minecraft-pi.png.
Now you can close the menu editor, go to your menu, go to games, and select the menu item that matches the one you created.
Please reply with any questions.

Gubba Monster
Last edited by Gubba Monster on Sun Jun 07, 2020 2:30 pm, edited 1 time in total.

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sat Jun 06, 2020 11:09 pm

Just curious, would anyone have a suggestion on how to be able to hit mobs, or could somebody give me all the commands that have to do with mobs?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14039
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sun Jun 07, 2020 12:20 pm

please don't create stupid polls, some people take offence with that, and complain...

Have fun! :mrgreen:

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Tue Jun 09, 2020 8:44 pm

Gubba Monster wrote:
Sat Jun 06, 2020 11:09 pm
Just curious, would anyone have a suggestion on how to be able to hit mobs, or could somebody give me all the commands that have to do with mobs?
Maybe a better way to put it is, does anyone know how to mod the minecraft pi python api to create a command for killing mobs with a sword?

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

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Jun 22, 2020 2:40 am

Thank you for putting this guide together, complete with a proper helper script so that people don't run into errors due to missing the Mesa wrapper.

I take it you already know how to kill mobs using TNT? Here's the best known Python script for setting off TNT in Minecraft Pi: https://www.minecraftforum.net/forums/m ... necraft-pi

As for using the sword directly, there isn't any way to fix this with the Python API alone. I've hoped that it might be possible to enable such by making a more advanced binary patch, but never dug far enough into it. There are some general tips on getting started in Phirel's post, which amounts to learning ARM assembly and stepping through to figure out where the attack routine currently diverges from the one in Minecraft Pocket Edition 0.6.1.

Jorick
Posts: 8
Joined: Fri Aug 21, 2020 12:17 am

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sat Aug 22, 2020 12:08 am

Thanks for the great instructions! I've been trying to find a way to do this for a while now. Too bad about not being able to hit mobs with swords though...

Jorick
Posts: 8
Joined: Fri Aug 21, 2020 12:17 am

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Aug 24, 2020 5:24 pm

Alright, so i tried to install bsdiff, and this is what happened:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
bsdiff
0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded.
Need to get 15.9 kB of archives.
After this operation, 31.7 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main bsdiff armhf 4.3-15
404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found [IP: 93.93.128.193 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Did I do something wrong?

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

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Aug 24, 2020 6:05 pm

Raspbian Jessie is no longer maintained. Upgrade to Buster.

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Wed Aug 26, 2020 2:50 pm

Jorick wrote:
Mon Aug 24, 2020 5:24 pm
Alright, so i tried to install bsdiff, and this is what happened:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
bsdiff
0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded.
Need to get 15.9 kB of archives.
After this operation, 31.7 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main bsdiff armhf 4.3-15
404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found [IP: 93.93.128.193 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Did I do something wrong?
See Jorick, you are using jessie, which is no longer supported. I had jessie a long time ago, and after a while it did the same thing. Like jdonald said, you need to upgrade to buster. To upgrade:
  • Open Terminal
  • Type

    Code: Select all

    sudo nano /etc/apt/sources.list
  • Replace everything inside with

    Code: Select all

    deb http://raspbian.raspberrypi.org/ buster main contrib non-free rpi
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
  • To save it, hit CTRL-X, Y, and ENTER
  • Now that you're back in the terminal, type

    Code: Select all

    sudo apt update && sudo apt upgrade
  • Now all that you have to do is reboot, and then try installing bsdiff again
Hope this helps,
Gubba Monster

rad27
Posts: 1
Joined: Sat Sep 19, 2020 8:38 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sat Sep 19, 2020 8:42 pm

@ Gubba Monster

I am getting below error....

****************************************************
pi@raspberrypi:/opt/minecraft-pi $ survival
ERROR: ld.so: object 'libbcm_host.so.1.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
* failed to add service - already in use?
***************************************************

Could you please advice on possible issue?

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Sep 21, 2020 2:08 am

Did you follow my steps exactly? Are you running the latest distribution of the Raspberry Pi OS?

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sat Oct 24, 2020 1:43 pm

Hi i'm someone new, I read all of your comments and most of you were begging for a way to attack mobs with a sword. If any of you are still here, I have good news for you guys, if any of you know "thebrokenrail", he made a docker project for minecraft pi edition. The project provided joining MCPE 0.6.1 servers (including PocketMine), attacking mobs, fancy graphics (clouds and transparent leaves), translations in the Crafting UI, placing signs, enabling/disabling the hidden MCPE touch UI, setting a new username, Bows fixed, the ability to disable auto-jump by default, selected block outlines, (More coming soon).

There's a website of the docker project: https://gitea.thebrokenrail.com/TheBrok ... -pi-docker

There is also a website called the MCPI Devs: https://mcpi.tk/

So what you need to do is install MCPIL (it only works for Raspberry Pi OS). To do that, you first need to open the terminal and update and upgrade your system:

Code: Select all

sudo apt-get update

sudo apt-get upgrade
Then you can install MCPIL by copying the commands bellow:

Code: Select all

curl -s https://packagecloud.io/install/repositories/Alvarito050506/mcpi-devs/script.deb.sh | sudo bash

sudo apt-get install mcpil
you should then go to your Pi menu in the games section you should see MCPIL it should have the nether reactor core logo. Click it, then you should be in the minecraft pi launcher. If you have any questions or problems, you can always reply to me.

Thanks! 8-)
Last edited by Unounited on Sun Dec 06, 2020 5:57 pm, edited 5 times in total.

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

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sat Nov 14, 2020 1:03 pm

rad27 wrote:
Sat Sep 19, 2020 8:42 pm

Code: Select all

pi@raspberrypi:/opt/minecraft-pi $ survival
ERROR: ld.so: object 'libbcm_host.so.1.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
* failed to add service - already in use?
That typically means the file is missing or corrupted somehow. And if it falls back to the legacy libbcm_host.so.1.0 then it expects the legacy Broadcom driver which of course can't work on a Pi 4.

I'm not sure how you could have deleted that file even if you made some typos following Gubba Monster's above instructions, but to troubleshoot you can run in the /opt/minecraft-pi folder:

Code: Select all

ls -la lib/mesa
and

Code: Select all

ldd LD_PRELOAD=libbcm_host.so.1.0 LD_LIBRARY_PATH=lib/mesa ./survival
The first command will list the contents of that folder, and hopefully libbcm_host.so.1.0 is in there. Next the ldd command will print shared dependencies as would have been used by the wrapper script. If working its output would include the libbcm_host.so.1.0 shim from lib/mesa, not a different one, and when not working hopefully the output provides clues.

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sun Nov 22, 2020 4:22 pm

You might not need to worry about the problem on what "jdonald" was talking about, because the MCPIL will be a lot better than running the survival patch from the terminal. By the way, I found out that the minecraft pi launcher requires the survival patch to be installed. So you will need to install the survival patch from "Gubba Monster's" 1st comment in order for the minecraft pi launcher to work, because if you don't have it installed and you go to the minecraft pi launcher, find a version and click launch, nothing will happen. You don't need to do the main menu editor part. That will just put the survival patch in your Pi menu, which is not really necessary. If you already have the survival patch installed, then you don't need to worry about it. Hopefully it works for you guys. Thanks!

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Thu Dec 03, 2020 3:43 pm

Unounited wrote:
Sun Nov 22, 2020 4:22 pm
You might not need to worry about the problem on what "jdonald" was talking about, because the MCPIL will be a lot better than running the survival patch from the terminal. By the way, I found out that the minecraft pi launcher requires the survival patch to be installed. So you will need to install the survival patch from "Gubba Monster's" 1st comment in order for the minecraft pi launcher to work, because if you don't have it installed and you go to the minecraft pi launcher, find a version and click launch, nothing will happen. You don't need to do the main menu editor part. That will just put the survival patch in your Pi menu, which is not really necessary. If you already have the survival patch installed, then you don't need to worry about it. Hopefully it works for you guys. Thanks!
Great. Thanks for your help! I am working on modding the raw code of minecraft pi. Does anybody know where to find the source code? As far as I'm concerned, it sounds like minecraft pi was made in C.

Thanks,
Gubba

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sun Dec 06, 2020 4:52 pm

I have been looking for the code too. The code you might be trying to look for is the python code for minecraft pi, which I think the code is in this website: https://raw.githubusercontent.com/raspb ... rksheet.md

If it's not what your looking for, let me know

Thanks!
Last edited by Unounited on Fri Dec 18, 2020 3:56 pm, edited 1 time in total.

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Wed Dec 09, 2020 8:15 pm

Hello, I've tried it and got this error

pi@raspberrypi:/opt/minecraft-pi $ ./survival

failed to add service - already in use?

What should I do and how to learn a different essay types?
You won't actually need to use the terminal to run minecraft pi survival. You could do 2 things:

1. If you want to fix the problem, go to raspberry pi configuration by typing this command:

Code: Select all

sudo raspi-config

go to Advanced options, GL Driver, Enable fake KMS, and reboot.

2. You could also install MCPIL (stands for minecraft pi launcher), first of all you should update, and upgrade using the terminal:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade
Go to this website on how to install it: https://github.com/MCPI-Devs/MCPIL. The MCPIL is way better than running survival in the terminal. I will explain why, you will be able to hit mobs with anything, shoot arrows with a bow, place signs and typing on it, clouds, peaceful mode, and more...

Hope it works for you! please reply with any questions or problems, Thanks!

darrensu
Posts: 6
Joined: Sat Apr 18, 2020 2:44 am

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Fri Dec 11, 2020 1:16 pm

Unounited wrote:
Wed Dec 09, 2020 8:15 pm
Hello, I've tried it and got this error

pi@raspberrypi:/opt/minecraft-pi $ ./survival

failed to add service - already in use?

What should I do and how to learn a different essay types?
You won't actually need to use the terminal to run minecraft pi survival. You could do 2 things:

1. If you want to fix the problem, go to raspberry pi configuration by typing this command:

Code: Select all

sudo raspi-config

go to Advanced options, GL Driver, Enable fake KMS, and reboot.

2. You could also install MCPIL (stands for minecraft pi launcher), first of all you should update, and upgrade using the terminal:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade
Go to this website on how to install it: https://github.com/MCPI-Devs/MCPIL. The MCPIL is way better than running survival in the terminal. I will explain why, you will be able to hit mobs with anything, shoot arrows with a bow, place signs and typing on it, clouds, peaceful mode, and more...

Hope it works for you! please reply with any questions or problems, Thanks!
Is this suitable for pi 3b+?


User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Jan 04, 2021 4:48 pm

Unounited wrote:
Sun Dec 06, 2020 4:52 pm
I have been looking for the code too. The code you might be trying to look for is the python code for minecraft pi, which I think the code is in this website: https://raw.githubusercontent.com/raspb ... rksheet.md

If it's not what your looking for, let me know

Thanks!
Well, my goal is to create a patch like the one I showed you in my first post, or I could just mod the raw code.

User avatar
Gubba Monster
Posts: 50
Joined: Wed Apr 01, 2020 9:52 pm
Contact: Website

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Jan 04, 2021 4:49 pm

darrensu wrote:
Fri Dec 11, 2020 1:16 pm
Unounited wrote:
Wed Dec 09, 2020 8:15 pm
Hello, I've tried it and got this error

pi@raspberrypi:/opt/minecraft-pi $ ./survival

failed to add service - already in use?

What should I do and how to learn a different essay types?
You won't actually need to use the terminal to run minecraft pi survival. You could do 2 things:

1. If you want to fix the problem, go to raspberry pi configuration by typing this command:

Code: Select all

sudo raspi-config

go to Advanced options, GL Driver, Enable fake KMS, and reboot.

2. You could also install MCPIL (stands for minecraft pi launcher), first of all you should update, and upgrade using the terminal:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade
Go to this website on how to install it: https://github.com/MCPI-Devs/MCPIL. The MCPIL is way better than running survival in the terminal. I will explain why, you will be able to hit mobs with anything, shoot arrows with a bow, place signs and typing on it, clouds, peaceful mode, and more...

Hope it works for you! please reply with any questions or problems, Thanks!
Is this suitable for pi 3b+?
Very much so, in fact, that's where I installed it (I don't have a pi4).

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Jan 11, 2021 9:35 pm

I actually recommend getting a pi4, because the pi you have has less hardwhere which makes your pi pretty laggy. My Pi4 has enough hardwhere to make my system work better, That would mean If you go into mcpil you will have 0 lag. Like I said your pi has less hardwhere than pi4's do, What i'm saying is that when you first install mcpil, it would start misbehaving, sometimes you get less lag, If you did get less lag, that means your pi needs an update, if your on the latest update on your pi, then mcpil would start lagging. A Pi4 will make mcpil have 0 lag. My Pi4 is really nice actually, I got my Pi4 on amazon for around $100.00. here's where I found it: https://www.amazon.com/CanaKit-Raspberr ... NrPXRydWU=.

By the way I was looking on the internet for the survival patch code, unfortunatly no luck, I will let you know if I do find it

Thanks!

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Wed Jan 13, 2021 4:18 pm

Maybe the survival code hasn't been released yet, if anyone has any idea on where to find it, I would be happy to hear it from you guys.
Last edited by Unounited on Mon Jan 18, 2021 5:51 pm, edited 1 time in total.

thestupidpikid
Posts: 1
Joined: Sun Jan 17, 2021 4:57 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Sun Jan 17, 2021 5:06 pm

i need help and FAST in the nano part thing i put pasted that long thing and then i dont know what to do. can you dumb it down for me. because now it says chmod: canot acess '/usr/bin/survival' : no such file or directrory
HELP!

Unounited
Posts: 68
Joined: Wed Oct 21, 2020 1:48 pm

Re: GUIDE: Installing Minecraft Survival on the Raspberry Pi (free)

Mon Jan 18, 2021 5:49 pm

You probably didn't save the nano code, did you paste this code?:

Code: Select all

#!/bin/sh

cd /opt/minecraft-pi || exit

if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status \
	/proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null; then
	export LD_PRELOAD=libbcm_host.so.1.0
	export LD_LIBRARY_PATH=lib/mesa
else
	export LD_LIBRARY_PATH=lib/brcm
fi

./survival
If you did, then hit CTRL-X, and y, ENTER on your keyboard.

Try doing that and then you should be able to continue the tutorial!

Return to “Gaming”