Hardware Reference
In-Depth Information
Minecraft Pi Controls
Clicking Start Game displays a list of Minecraft worlds that you can join. On your irst
go, however, this list will be empty. Click Create New to generate a Minecraft world in
build mode. Minecraft has two modes, survival and build . In build mode, you are able
to construct objects without having to avoid monsters who may end your life. Play
around a bit and familiarize yourself with the controls for playing Minecraft in build
mode, shown in Table 6-1.
Table 6-1 Minecraft Pi Controls
Key press/mouse
movement
Action
W
Moves player forwards.
A
Moves player left.
S
Moves player back.
D
Moves player right.
Spacebar
Makes player jump. Tap the spacebar twice to make the player ly.
Tab
Releases the mouse so you can click on other windows.
Esc
Returns you to the menu.
Move the mouse
Allows you to see around the player and point the player in a par-
ticular direction.
Left mouse click
Breaks the blocks around you.
Right mouse click
Places a block.
Being able to play Minecraft is one fun aspect of Minecraft Pi, but what is more excit-
ing is being able to use Python code to manipulate the Minecraft environment. Time
to dive in.
A
Minecraft Pi has programming libraries for Java and Python but not Python 3,
which you have been using so far in this topic.
In previous adventures you have used the Python 3 shell—IDLE 3. In this
adventure, however, you will create and run your Python Minecraft programs from
the command line using the LXTerminal and the text editor nano. This is slightly
more advanced, and you will ind it slightly quicker than running all your Python
programs in IDLE.
Search WWH ::




Custom Search