I wrote a ModPE mod that implements most of the Raspberry PI Minecraft's API, and thereby allows one to write and run Python scripts to do various cool things. Most of the Python scripts in the Whale and O'Hanlon book should work in theory, and most of my desktop scripts worked with no changes (or at most minor changes to scale down the drawings for a slower device).
Detailed instructions on how to install and use the mod are here. An apk installer for the mod and sample Python scripts (mostly fractals) is in Google Play (you will need MC PE, BlockLauncher and QPython). Source code is here.
For convenience the mod also implements /tp and /time set commands, and you can also use this mod to send photos and schematic files to MCPE.
This is a Pocket Edition version of my Raspberry Jam Mod for Desktop 1.8. I'll be using the desktop version to teach programming to kids this summer.
A particularly fun way to use the mod is with simple turtle graphics code, like this Python script to draw a waterfilled glass star (which you'll need to teleport out of):
from mcturtle import *
t = Turtle()
t.pendelay(0)
t.turtle(None)
t.penwidth(6)
t.penblock(GLASS)
for i in range(5):
t.go(30)
t.right(144)
t.penwidth(3)
t.penblock(WATER)
for i in range(5):
t.go(30)
t.right(144)
I uploaded 1.12 which fixes the chess script and includes a symmetry script that replicates whatever you draw (see the comments in symmetry.py for documentation).
I uploaded a new version which has two new features:
- send *.schematic files to Minecraft
- send photos to Minecraft to be made into giant pixel art
Here's how to do it after installing Raspberry Jam Mod (using the install button in it: you can actually skip the QPython installation for these features).
Schematics:
1. Download schematic.
2. Start BlockLauncher and a Minecraft PE world. Put player where you want the bottom center of the schematic to go.
3. Select *.schematic file in a file manager and choose "Schematic to Minecraft". (On some devices you can select the schematic file right after downloading from the browser.)
1. Start BlockLauncher and a Minecraft PE world. Put player where you want the lower left corner of the photo to go, and face in the direction you want to see the drawing.
I wrote a ModPE mod that implements most of the Raspberry PI Minecraft's API, and thereby allows one to write and run Python scripts to do various cool things. Most of the Python scripts in the Whale and O'Hanlon book should work in theory, and most of my desktop scripts worked with no changes (or at most minor changes to scale down the drawings for a slower device).
Detailed instructions on how to install and use the mod are here. An apk installer for the mod and sample Python scripts (mostly fractals) is in Google Play (you will need MC PE, BlockLauncher and QPython). Source code is here.
For convenience the mod also implements /tp and /time set commands, and you can also use this mod to send photos and schematic files to MCPE.
This is a Pocket Edition version of my Raspberry Jam Mod for Desktop 1.8. I'll be using the desktop version to teach programming to kids this summer.
A particularly fun way to use the mod is with simple turtle graphics code, like this Python script to draw a waterfilled glass star (which you'll need to teleport out of):
Updated for 0.11.1. Should up on Google Play soon.
And yesterday I uploaded a version with some more bug fixes and optimizations.
I just updated the mod to 1.11, which fixes some bugs in getBlock*() and getHeight() code.
Some fun scripts to try:
/py castle
/py donut
/py chess d
(I haven't tested chess. If you omit "d", you should in theory be able to play against the computer, by right clicking with a sword on your moves.)
You can also make a simple moving vehicle, away from terrain blocks, and make it go by putting the player inside it (or on it) and typing:
/py vehicle
I uploaded 1.12 which fixes the chess script and includes a symmetry script that replicates whatever you draw (see the comments in symmetry.py for documentation).
I uploaded a new version which has two new features:
- send *.schematic files to Minecraft
- send photos to Minecraft to be made into giant pixel art
Here's how to do it after installing Raspberry Jam Mod (using the install button in it: you can actually skip the QPython installation for these features).
Schematics:
1. Download schematic.
2. Start BlockLauncher and a Minecraft PE world. Put player where you want the bottom center of the schematic to go.
3. Select *.schematic file in a file manager and choose "Schematic to Minecraft". (On some devices you can select the schematic file right after downloading from the browser.)
Photos (detailed instructions here)
1. Start BlockLauncher and a Minecraft PE world. Put player where you want the lower left corner of the photo to go, and face in the direction you want to see the drawing.
2. Load photo in gallery.
3. Choose "Share to MCPE".
I think this is really awesome arpruss. Great job! ☺
I uploaded a new version that works with the current qpython (/py script) and qpython3 (/p3 script).