Hardware Reference
In-Depth Information
All of the new Python and Minecraft statements you learned in this chapter are listed
in the reference section in Appendix B.
You can find a complete list of block id numbers on the Minecraft wiki: http://
minecraft.gamepedia.com/Blocks . Minecraft extra data values are taken from: http://
minecraft.gamepedia.com/Data_values .
Wool is a very useful block type to build with, as you discovered when laying the ran-
dom carpets in your street of houses. Here is a reference to the different colours that
can be used with the block.WOOL.id block type. Look back at your buildStreet2.
py program to see how to provide this extra data to the Minecraft API.
0 white
1 orange
2 magenta
3 light blue
4 yellow
5 lime
6 pink
7 grey
8 light grey
9 cyan
10 purple
11 blue
12 brown
13 green
14 red
15 black
Further Adventures in
Building Anything
In this adventure, you've learned how to create single blocks and whole areas of blocks
inside the Minecraft world using a single line of a Python program. You've built some
pretty impressive structures already. You've learned that with functions you can split
up your program into smaller logical units and, with for loops, repeat things over and
over again. With this knowledge you should be able to build almost any structure you
could possibly imagine!
Using the techniques learned in this adventure, write one function for each of
the six faces of a dice. Write a loop that spins round a random number of times,
showing a different dice face each time round. Use random.randint() to stop
on a random pattern, and challenge yourself and your friends to try and guess
the number the Minecraft dice will stop on.
Make a list of other things you could randomise about your street. Perhaps do
some research by walking down your own street and seeing how the houses dif-
fer from each other. Define more house functions, one for each type, and try to
build more complex streets with houses in lots of different styles.
Get together with some friends and join all your different house-building pro-
grams into one big program. Use it to build a whole community of houses of
different styles inside your world. Marvel, as you walk around your new town, at
how much variety there is in house design!
 
 
Search WWH ::




Custom Search