Flat World

This week we built our first Minecraft program using Python. We used Thonny to write our code, and Minecraft Pi edition is the version of Minecraft we use

We first import the libraries we need to make our program run, these are the MCPI libraries. mcpi is a Python library that allows you to interact with Minecraft: Pi Edition, a version of Minecraft specifically designed for the Raspberry Pi platform.

This library provides a set of Python functions to programmatically modify the Minecraft world around the player. With mcpi, you can create and alter blocks, track player location, respond to player actions, and more.

We then create a connection to our Minecraft game and get our position in it

Next we get user input for how much space do we want to clear

Finally we clear the area from where we are standing

Check out the code we wrote below

Previous
Previous

Wormy Graphics

Next
Next

Auto Scroller Arcade Game