Hardware Reference
In-Depth Information
roomy = y
roomz = z
mc.setBlocks(roomx, roomy, roomz,
roomx+SIZEX+2, roomy+SIZEY+2, roomz+SIZEZ+2,
block.GLASS.id)
mc.setBlocks(roomx+1, roomy+1, roomz,
roomx+SIZEX+1, roomy+SIZEY+1, roomz+SIZEZ+1,
block.AIR.id)
Save your program and test it again. Test option 1 on the menu to make sure that you
can build the duplicator room. Run to another location in the Minecraft world and
choose option 1 again to see what happens! Figure 6-9 shows the duplicator room after
it has just been built.
FIGURE 6-9 The duplicator room built in front of you
DIGGING INTO THE CODE
Python uses indentation (spaces or tabs) on the left-hand side, to identify
which groups of program statements belong together. Whenever you use
loops or if/else statements, or even functions, you have been using inden-
tation to group together program statements that belong together. Python is
unusual in its use of indents to group statements into blocks, many other lan-
guages such as C and C++ use special characters such as { and } to group the
 
Search WWH ::




Custom Search