Years ago, for my older kids' coding education, I made a Minecraft mod that lets you program in Python. Now I made a Scratch extension that works with that mod for block-based programming, that I am hoping to get my youngest into. Instructions and links are here.
Friday, November 27, 2020
Saturday, October 27, 2018
Minecraft cake cake
Wednesday, August 10, 2016
Random dithering of images
One could come up with a 3D version of one of these algorithms, but I went for a different tack: random dithering. Random dithering isn't much used these days, because it is thought to produce really bad results. But while that would no doubt be true with a two-color palette, it doesn't seem to be true with a larger palette, like my Minecraft 82 block palette. The method I used was to add to each color channel a random perturbation, with distribution either uniform or a cut-off Gaussian, and the results were gratifying. Not quite as good as Floyd-Steinberg, but close.
The original is on the right. "Gaussian X/Y" means a perturbation with sigma X, cut off at -Y and Y. "Uniform X" means a perturbation uniform over the interval [-X,X].
And here's how it looks wrapped on an egg (uniform 20, I think):
Actually, on this cartoon stuff, the dithering is hardly needed. A photograph benefits more from the dithering. It's a dung beetle I photographed outside of our house some years ago.
Original:
Minecraft renderings:




In both cases, uniform 20 and Gaussian 20/30 seem good enough. Source code here.
Tuesday, July 19, 2016
Falling-block game in Minecraft
Wednesday, June 29, 2016
IRToWebThingy
For quite some time, my older daughter has wanted me to make her Great Wolf Lodge Magiquest wand do something at home. So I made a simple IRToWebThingy (the link gives build instructions). It takes infrared signals in many different infrared remote controls and makes them available over WiFi. As a result, we can now watch Netflix with a laptop and a projector and the ceiling and play/pause with the Magiquest wand (and adjust volume with our DVD remote) with a pretty simple python script. My son (with some help) made a 3D etch-a-sketch script that lets him draw in Minecraft with the DVD remote. I made a fun script that lets you fly a pig in Minecraft with a Syma S107 helicopter remote (see photo). You can even control rooted Android devices with IR remotes and shell scripts.
Sunday, June 26, 2016
Teaching programming with Python and Minecraft
Last summer, I taught programming to gifted kids with Python and Minecraft. Here's my Instructable giving a curriculum for a course like that.
Thursday, June 23, 2016
RaspberryJamMod for Minecraft/Forge 1.10
My RaspberryJamMod, which enables the Minecraft PI API for Python programming, has been updated to work with Minecraft/Forge 1.10. Still alpha-quality, but everything I've tried seems to work.
Sunday, March 27, 2016
Christ is risen!
Happy Easter, everyone!
Here are Easter eggs in Minecraft generated using my pysanka.py python script (included with Raspberry Jam Mod). The middle one is based on the design here (I am trusting that the amount of deformation and transformation is sufficient that it not be a copyright issue to post the Minecraft version).Here are instructions on making eggs like that.
Tuesday, December 29, 2015
RaspberryJamMod for Forge/Minecraft 1.8.8
I just updated RaspberryJamMod, which allows one to run python code in Minecraft (using a variant of the Raspberry PI Minecraft API), to work with Minecraft 1.8.8 (with the latest beta of Forge). Merry Christmas!
Here's a rebel fighter from Space Janitors (using a mesh in their Janitor's Closet) generated with the render.py script.

Thursday, September 24, 2015
Visual programming for Minecraft
One of my hobbies is computer science education for children. Over the past year or so, I've been developing Raspberry Jam Mod (requires Forge and Minecraft 1.8), a Minecraft mod that implements the Raspberry Pi Minecraft API and allows one to write Python code that connects with Minecraft (this isn't that original: there are two other projects that do that). I taught some Python to gifted middle- and high-schoolers in the summer using this setup.
Over the last couple of days, I decided it would be nice to make something like this available for younger kids, using Google's Blockly graphical programming environment in place of Python. It's nothing very sophisticated, but you can use 3D turtle graphics commands to draw stuff in Minecraft. If interested, install Forge for Minecraft 1.8, then Raspberry Jam Mod version 0.50 or higher, start a single-user Minecraft world, and point your browser to robotblocks.appspot.com to get the Blockly code editor in-browser. The in-browser Blockly editor should then talk to your Minecraft.
Source code for the Blockly stuff is here.
Friday, July 10, 2015
Saturday, June 13, 2015
Generating looping color gradients with a limited palette
Thursday, June 4, 2015
Python coding for Android Minecraft PE
Tuesday, May 19, 2015
Lifelikeness of fractals
Instructions on how to do this stuff in Minecraft are in my Python coding for Minecraft instructable.
It was very easy to generate the following fairly lifelike tree with a simple bit of recursive code and some randomness.
An L-system does a pretty lifelike job even without randomness (using rules from geeky.blogger):
There is something glorious about a world where structures are mirrored on multiple levels. It makes the different parts and levels of the world be like a work of art, with themes and intertextuality.
Tuesday, April 21, 2015
Deep Space Nine in Minecraft
Saturday, March 28, 2015
Instructable for python coding for Minecraft
Friday, January 23, 2015
Minecraft and python: Raspberry Jam Mod
So this January I made a mod for Minecraft 1.8 and Forge that implements most of the Raspberry PI protocol and works with most of the python scripts that work with Minecraft PI Edition. For instance, here's a spiral and a glass torus with water inside.
To install, you'll need python, Minecraft 1.8, Minecraft Forge, my Raspberry Jam Mod and the Minecraft PI Python package. Then:
- Install Forge for 1.8.
- Create a Minecraft profile that uses it.
- Create a mods subdirectory to your Minecraft directory (%appdata%\.minecraft on Windows, I believe).
- Put my mod in the mods directory.
- Create an mcpipy subdirectory to your Minecraft directory.
- Put the contents of the Minecraft PI Python package into the mcpipy directory.
- Create a Minecraft profile that uses the 1.8 Forge.
- Run Minecraft and create a world.
- Run python scripts via commandline or straight in Minecraft via /py scriptname. E.g., /py nt7s_sphere will draw a sphere.

























