How to create your own scripts

By default, PyCraft uses the example scripts that come with RaspberryJam Mod. There are several dozens, created by many different people who have made them freely available online. You are very welcome to look, use and modify them as you like!

All the Python scripts which interact with Minecraft use a collection of other Python scripts called mcpi, which handles all the difficult stuff, like connecting to your world and moving things around as you wish, you just have to tell it what you want.

There are many good sources to get started, plenty of blogs and tutorials online. A really good self-contained guide detailing everything from setting up your computer to creating interactive games, is the book Adventures in Minecraft by Martin O’Hanlon.

In this section we propose you use the Jupyter Notebook to write your Python programs. Once installed, it opens in your browser, and let’s you do all your programming there, allowing you to write and execute small pieces of your code whenever you want!

We provide three examples to help you get started: