Wikijunior:Raspberry Pi/Minecraft Christmas Tree Decorations
by Andrew Oakley andrew@aoakley.com for Cotswold Jam
Public Domain 2018-11
You need a world with trees
[edit | edit source]To load/reset a snowy woodland world in Minecraft:
cp minecraft-snow-trees-flat.tgz ~/
cd
tar xvzf minecraft-snow-trees-flat.tgz
cd -
Run the program and play with it!
[edit | edit source]The makestar1.py and makestar2.py programs create a Christmas star in a 3×3×3 block (think of a Rubik's Cube – 3 blocks wide, 3 high, 3 long). The star will be placed a few blocks north of the player.
Try editing the block IDs and wool status colours to make your own designs!
To put stars on the top of all nearby trees, uncomment the last line: ("uncomment" means remove the #
at the start of the line)
xmastrees.find_trees(mc,playerx,playery,playerz,10,2,makestar)
Note that it can take several minutes to find all nearby trees.
WOOL status colours
[edit | edit source]Code | Colour | Code | Colour |
---|---|---|---|
00 | White | 08 | Light grey |
01 | Orange | 09 | Cyan |
02 | Magenta | 10 | Purple |
03 | Light Blue | 11 | Blue |
04 | Yellow | 12 | Brown |
05 | Lime | 13 | Green |
06 | Pink | 14 | Red |
07 | Grey | 15 | Black |
Advanced topics
[edit | edit source]Finished making stars? Try making a star out of WOOD and see how that causes the find_trees program to go horribly wrong!!! Why does making a star out of WOOD or CACTUS cause find_trees to go wrong?