Hardware Reference
In-Depth Information
CHALLENGE
Can you improve the transporter program in the following ways?
Modify the code so that a player can set the second transporter
location when and where she wants it. Instead of using a timer,
you could use input!
Modify the code so that it can post to chat with a countdown num-
ber every ive seconds, so that the player knows how long she has
left to move.
Sharing and Cloning Minecraft
Pi Programs
When the Minecraft community meets the Raspberry Pi community, good things hap-
pen. Many people enjoy sharing the programs they have made for Minecraft Pi so that
you can clone them or make copies of them to use on your own Raspberry Pi. You can
ind shared Minecraft Pi programs on the Minecraft Pi forum ( www.minecraft
forum.net/forum/216-minecraft-pi-edition ) or the Raspberry Pi forum
( www.raspberrypi.org ) . Many programmers who share their code use an online
repository such as GitHub ( https://github.com ) so that you can easily download
their code, try it out and help improve it. Why not have a go at downloading Martin
O'Hanlon's Minecraft Cannon program? his program places a cannon where your
player is positioned in Minecraft Pi. You use the LXTerminal command line to move
the cannon up or down before iring blocks. Check out the video at www.youtube.
com/watch?v=6NHorP5VuYQ to see it in action.
1. Open an LXTerminal window. If your Raspbian image is not up to date you may
not be able to install the required applications, so irst update your application
packages by typing the following command into the terminal:
sudo apt-get update
2. Next, type the following line:
sudo apt-get install git-core
his command installs an application called git-core that lets you clone the
code that Martin has placed on a repository called github .
3. After git-core is installed, type the following code to have git-core create
a clone of the Cannon program on your Raspberry Pi:
cd ~
git clone ;
https://github.com/martinohanlon/minecraft-cannon.git
 
Search WWH ::




Custom Search