Blog Archives

MCPI Game Of Life

https://mcpionline.files.wordpress.com/2013/02/python_banner1.jpg?w=300

Jason Milldrum of NT7S.com has come up with a brilliant version of the popular game, ‘The Game Of Life‘. It uses Obsidian blocks to show dead cells and Diamond blocks to show alive cells on a 64×64 block board.

The code is pretty big, so to save the homepage of the site being filled by a single program, you can view the code here!

Credit goes to Jason Milldrum NT7S.com

Change Your Skin in MCPI

minecraftpi

Using the default ‘Steve‘ skin can be boring. Why not change it up a little? Follow this guide and find out how to add your own, personal skin to your MCPI game!

  1. Head to the /mcpi/data/images/mob dictionary. Inside you will find a .png file called ‘char‘ (char.png). Delete it or move it to another location in case you decide you prefer the default ‘Steve‘ skin.
  2. Copy a skin from your PC onto your Raspberry Pi using a USB Storage Device.
  3. On your RPi, copy or move the new skin into the /mcpi/data/images/mob dictionary.
  4. Rename the new skin to char.png. This allows the game to register it as the player’s skin.
  5. Load up MCPI and start looking cooler!

If this guide worked for you please leave a like! If you are having problems with this or any other tutorial on the site, please leave a comment!

 

Python: Auto Rainbow

This cool little program designed by ‘500 Internal Server Error‘, automatically builds a rainbow in your MCPI world, upon loading the python file.

—————————————————————————————————-

The code is as follows:

import mcpi.minecraft as minecraft
import mcpi.block as block
from math import *
colors = [14, 1, 4, 5, 3, 11, 10]
mc = minecraft.Minecraft.create()
  height = 60
mc.setBlocks(-64,0,0,64,height + len(colors),0,0)
  for x in range(0, 128):
  for colourindex in range(0, len(colors)):
  y = sin((x / 128.0) * pi) * height + colourindex
  mc.setBlock(x - 64, int(y), 0, block.WOOL.id, colors[len(colors) - 1 - colourindex])

—————————————————————————————————-

The original thread where the program was shared can be found here.

To run the program, open up ‘LeafPad‘, copy this code into it and save it in /mcpi/api/python as a .py file. Save it as rainbow.py. Then, once you have a MCPI world loaded up, open up ‘Terminal‘ and navigate to where you saved the file using cd and type python rainbow.py.

How To Make A MCPI Desktop Shortcut

minecraftpi

Having to open up Terminal and typing in commands, just to run MCPI can become a pain. That is why I have found a simple and quick solution to the problem! Follow this guide and you’ll have MCPI open with a quick double click!

  1. First, save this image to your computer and copy it to your Pi and into your mcpi folder.
  2. Next, on your Pi, right-click on your desktop and go to ‘Create New…‘ and then ‘Blank File‘. Name the file ‘mcpi.desktop
  3. Right-click on the new .desktop file and open the file with ‘LeafPad‘.
  4. Once in ‘LeafPad‘ copy the code from this link into the file.
  5. Make sure your read the note in the code.
  6. Now, save your .desktop file and close ‘LeafPad‘.
  7. Go back to your desktop and you will see your a file called ‘Minecraft: Pi Edition‘. Double click on that and the game will appear!

If this helped, please leave a like! It’s free! If you are having any problems feel free to leave a comment!

Minecraft: Pi Edition Installation Guide (V 0.1.1 Alpha)

minecraftpi

Browsing across the Minecraft: Pi Edition forum on the Minecraft Forums, I have noticed a few people struggling to get the game running on the Raspberry Pi. Well, look no further, for I have created a guide to install the game quickly and efficently! You’ll be playing in no time!

Step 1:

Download the game files from here. The downloaded file will have a .tar.gz extension.

Step 2:

If you don’t already have it, download the latest Rasbian ‘wheezy’ .img file from here. You will need this to run the game. Just install this like you did when you wrote your first .img file to your Pi.

Step 3:

Once your Pi is running the latest Rasbian ‘wheezy’, transfer the game files to your Raspberry Pi. Just place them in your user dictionary (Called ‘pi’ by default). You can use a USB or whatever you fancy.

Step 4:

Open up ‘LXTerminal‘ and type the following in bold…

  1. tar -zxvf minecraft-pi-0.1.1.tar.gz – This decompresses the file.
  2. cd mcpi – This opens up the folder where the data is stored.
  3. sudo chmod +x minecraft-pi – This allows the program to be  executed.
  4. ./minecraft-pi – This opens the game!

Step 5:

Your game should now be running! If you haven’t any problems, feel free to leave a comment!

Minecraft: Pi Edition Now Available!

cropped-Pi-Edition-header1

The long awaited Minecraft: Pi Edition was released to the world four days ago.

The game includes an API in Python, Java and Ruby (Ruby API downloaded separately. Players have already begun to create amazing scripts with the API and with the game only being out for under a week, I am sure more things are to follow!

If, for some reason, you still haven’t gotten the game you can get it here! If you wish to also download the Ruby API, then download that here!