## Overview

In this project, we'll allow our character to set a block of predefined type and move it around the Minecraft world using buttons on our Ready Set STEM. In future projects, we'll extend this functionality to allow us to "paint" the Minecraft landscape with lots of blocks of different types.

## Hardware Setup

## Writing Our Code

## Hardware Setup

## Writing Our Code

In this project, we will create a block at the location of our character. Using four buttons on our kit (up, down, left, right) we can move that block around the Minecraft world. This will set the groundwork for future projects.

Here is what the full code for this project should look like:

from rstem.button import Button from rstem.mcpi import minecraft, control, block from rstem.mcpi.vec3 import Vec3 import time control.show() mc = minecraft.Minecraft.create() left = Button(23) right = Button(14) up = Button(18) down = Button(15) cursor = mc.player.getTilePos() cursor.y = mc.getHeight(cursor.x, cursor.z) while True: old_cursor = cursor.clone() cursor += Vec3(0, 0, right.presses()) cursor += Vec3(0, 0, -left.presses()) cursor += Vec3(up.presses(), 0, 0) cursor += Vec3(-down.presses(), 0, 0) if old_cursor != cursor: mc.setBlock(old_cursor, block.AIR) cursor.y = mc.getHeight(cursor.x, cursor.z) mc.setBlock(cursor, block.STONE) time.sleep(0.01)