Hardware Reference
In-Depth Information
CHALLENGE
The hour hand on real clocks tracks every minute of the hour. For example, if the
time is 11:30, the hour hand will be halfway between the 11 and the 12. The
code for the Minecraft clock you've just created doesn't work this way—the hour
hand remains pointing at 11 until 11:59:59 ticks over to 12:00:00.
See if you can make your Minecraft clock work like a real clock by changing how
you calculate the hour angle.
Drawing Polygons
A polygon is any 2D shape made up of straight connecting sides. It can have any num-
ber of sides, from three (a triangle) upward. As you can see from Figure 7-6, you can
create any number of interesting polygons in Minecraft.
FIGURE.7-6 Examples of polygons in Minecraft
Although they are 2D shapes, you'll find polygons extremely useful for making 3D
graphics, as you can create virtually any 3D object by connecting lots of polygons
together. When polygons are used together to create 3D objects, they are known as
faces . You can create some awesome structures this way. Just look at Figure  7-7,
which shows the skyline of Manhattan Island, created by lots of polygons (see how
it's done at www.stufaboutcode.com/2013/04/minecraft-pi-edition-manhattan-
stroll.html) .
 
Search WWH ::




Custom Search