Search this site
Embedded Files
Skip to main content
Skip to navigation
mcpimod
Home
Environment
API
Lessons
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
mcpimod
Home
Environment
API
Lessons
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
More
Home
Environment
API
Lessons
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 7
Try out some examples
Martin O'Hanlon created the Minecraft Pi API and a bunch of ingenious games with it. Pick one to try out and figure out how its code works.
To try one out...
You can follow a link below to find each program's page, then scroll down the page until you find the CODE.
Highlight O'Hanlon's code, copy it, paste it in your own python document (filename.py). Some also have a github link to download the code.
Find the line that says
mc = minecraft.Minecraft.create()
and edit to
mc = minecraft.Minecraft.create("10.10.0.21",4711,"yourname")
Sometimes you have to change the import statements to import from mcpi.
The indents will all be made with spaces! You must remove all the spaces and tab the indents. All of them. It's a drag.
Links
Auto bridge
: Run through the air and a diamond bridge appears under every footstep. It's cool.
Hide and Seek
: Find a hidden block. You will be given warmer/colder clues.
Minecraft Graphics Turtle
: Tell a turtle to draw in Minecraft using the MinecraftTurtle module.
Minecraft Shapes
: Create different shapes--spheres, circles, triangles and stuff--with the MinecraftStuff module.
Minecraft Cannon
: It can blow stuff up.
Lesson 7 is done! Don't forget to answer questions for Lesson 7 in MyHewitt.
And after that do Project 2 (in MyHewitt) Make Your Own Game.
Report abuse
Report abuse