10MINECRAFT MAGIC WITH FOR LOOPS
Now it’s time to learn about for loops. for loops are super useful because they iterate over lists of items, like the lists you saw in Chapter 9. This means that they are perfect when you want to use loops with lists in your programs.
While following along with the missions in this chapter, you’ll use for loops to generate stairs, pillars, pyramids, and weather-beaten walls. With nested for loops and lists, you’ll be able to create pixel art and generate new structures in seconds. for loops are very powerful tools for building in Minecraft!
A Simple for Loop
A for loop repeats a block of code for each item in a ...
Get Learn to Program with Minecraft now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.