Simple Minecraft Programming Using ScriptCraftJS

Minecraft castle built by me and my son.

As a fan of Minecraft, I have enjoyed seeing it used for fun and playful learning.  In this post, I would like to introduce a technology for programming Minecraft and making small games.   ScriptCraft by Walter Higgins enables you to automate various tasks in Minecraft using the popular computer programming language JavaScript.   In contrast to other technologies for programming Minecraft, Mr. Higgins has made the process of programming Minecraft fun and simple. Thanks you Mr. Higgins and the community of for making this technology free and open source.

Teachers of math and computer science will find playful ways to teach their subjects using ScriptCraftJS.   Thanks to the awesome work from Joel Levin and the community of Minecraft Edu, teachers can find thoughtful examples of engaging students in learning through Minecraft.   This technology can be very powerful when connected to project based learning ideas and game based learning.


As as a dad, I enjoy playing Minecraft with my son.   It has been such a pleasure to encourage my son’s creativity by playing Minecraft with him.   He’s still a pretty young guy.    I, however, am amazed how well he can navigate through the Minecraft 3D world.  He can build floors, walls, dig, and decorate.   With ScriptCraft in my tool box, I hope to create more tools for us for our Minecraft playtime.


For our readers, I have collected a few resources that will help you learn JavaScript and get started using ScriptCraft.

How do I get started learning JavaScript?

How do I setup ScriptCraft on my computer?  How do I start learning how to program Minecraft?

What stuff can you program in Minecraft?  What does the API for CraftScript look like?

How could you draw a box in ScriptCraftJS?

function drawBox()
// The drone object enables you to
// layout bricks in 3d space
var theDrone = new Drone();
var i;

//Go 10 steps forward while dropping type "5" boxes ....
for(i=0; i"5").fwd(1)

//Go 10 steps up while dropping type "5" boxes ....
for(i=0; i"5").up(1)

//Go 10 steps back while dropping type "5" boxes ....
for(i=0; i"5").back(1)

//Go 10 steps down while dropping type "5" boxes ....
for(i=0; i"5").down(1)

I’m new to running a Minecraft server.   What are the common  server commands?

Can you make games in Minecraft using CraftScript?

Walter Higgins has an awesome demo of creating a snow ball fight game.   The video also includes brief overview of the code he used to create the game.

Related Links: