Skip to content

Instantly share code, notes, and snippets.

@dglaude
Last active August 12, 2017 20:35
Show Gist options
  • Save dglaude/915e02b35347441efe0d043c4511fd4e to your computer and use it in GitHub Desktop.
Save dglaude/915e02b35347441efe0d043c4511fd4e to your computer and use it in GitHub Desktop.
Notes on installing Adventure in Minecraft on Raspbian x86

I am working on a PC with Raspbian x86 installed from the bootable DVD comming from RaspiMag N°60.

I did basic stuff to change the password and update to the lattest version:

passwd 
sudo apt-get update
sudo apt-get upgrade

Then installed the Minecraft game (I have a licence for two of my kids).

Apparently I installed Java VM:

sudo apt install default-jre

Latter I found out Minecraft was crashing with the free version of Java, so I went for Oracle version:

java -version
sudo update-java-alternatives -l
sudo update-java-alternatives -s oracle-java8-jdk-i386
sudo apt-get install oracle-java8-jdk
java -version

I used the browser to download "Minecraft.jar" (This was from Mojang, but I don't remember the URL).

Then I followed various tutorial and created a folder for minecraft and movet the jar there.

mkdir .minecraft
cd .minecraft/
mv Downloads/Minecraft.jar .minecraft/

I guess that was enough to make things work, then I just had to launch:

java -jar Minecraft.jar

From memory, this failled but I read about it: sudo apt-get install minecraft-installer And I was also reading how to install a server: https://stacksetup.com/Gaming/Minecraft

To make the installation a bit more kid friendly, I also downloaded a 256x256 Minecraft icon and made a menu entry. I believe this was done with the graphical interface: Top Left Menu > Preference > Main Menu Editor The result of those operation is a file "alacarte-made-1.desktop" on my desktop with the following content:

[Desktop Entry]
Comment=Lance Minecraft
Terminal=false
Name=Minecraft
Exec=java -jar /home/pi/.minecraft/launcher.jar
Type=Application
Icon=/home/pi/icones/minecraft.jpg

You can see that I don't execute Minecraft.jar but launcher.jar I guess that was downloaded by Minecraft.jar and I raid somewhere that this was what I needed to launch.

So now I want to install a Minecraft server, and modify it for Adventure in Minecraft. From memory, this mean running a Bukkit server, installing some code to emulate the Raspberry Pi API, installing that API. But I am not alone in this task, I will follow the instruction from: https://adventuresinminecraft.github.io/ Actually waiting for a Raspbian x86 version, I was told to follow the MAC instruction, but using .sh rather than .command.

So I first downloaded "AIMStarterKitMac.zip" and moved that to my home directory, then went to unzip it.

mv Downloads/AIMStarterKitMac.zip /home/pi
unzip AIMStarterKitMac.zip 
rm -r __MACOSX/
cd AdventuresInMinecraft-Mac/
./StartServer.command 

At that point, the server started and created the world.

Then I started Minecraft client and created a version 1.12 profile (required as indicated when launching "./StartServer.command"). (Previously I did try to connect with a client in 1.12.1 and it failed) I choosed "Multiplayer" and created a server with address 127.0.0.1. Clearly the "CraftBukkit 1.12" is visible.

I was a bit surprised to be in the total darkness... My son suggested to type the commande "time set day". It did not fix a thing, in fact I was under water, the space bar helped me reach the surface and I "W" walked to the ground.

To test the Python API, I downloaded the book example "code-files-master.zip" then I moved things around.

cd /home/pi/AdventuresInMinecraft-Mac/MyAdventures
cp /home/pi/Downloads/code-files-master.zip .
unzip code-files-master.zip 
code-files-master/
cd Adventure1/
cp HelloMinecraftWorld.py ../..
cd ../..
python HelloMinecraftWorld.py 

That seems to work.

Then I went for another example with the same success:

cp code-files-master/Adventure2/whereAmI2.py .
python whereAmI2.py 

So everything seems to work as expected. Nothing special was done. Applying the server zip for MacOS and following more or less the instruction, everything work fine.

I may have badly documented some steps, not every command is exactly what I found in my history. I hope this can be usefull to anybody.

Regards.

@whaleygeek
Copy link

This is super, thanks for documenting this! cc // @martinohanlon

@whaleygeek
Copy link

Note that the version of codefiles.zip on the github.io page has some updates planned for it in the next couple of weeks, so you might find some of the later adventures don't quite work yet (we moved from python2 to python3, and added a chapter for the next edition).

Mostly you'll notice that python2 uses raw_input() and python3 uses input() - I think all other changes were to bring it up to date with the latest Minecraft version.

Oh, and yes, you have to have the exact same version for the server and the client, else you will get that error.

@dglaude
Copy link
Author

dglaude commented Aug 12, 2017

Almost everything went smoothly.

I did everything from web information and did not use my copy of the book (first edition).

The best would be to try again from scratch, following my own instructions and making correction.

Moving to Python 3 is a nice thing to do, we should all try to stop using python 2.

I know you work on next version of the book. Will the French version follow the same revision?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment