Description

BlocklyCraft is a plugin for Minecraft Servers which lets younger programmers to create their own Minecraft Mods. Mods are written with Blockly, a visual programming editor. It runs in a web browser, and resembles Scratch.

BlocklyCraft works with all of the following Minecraft Server software:

Because BlocklyCraft is based on ScriptCraft, the mod also lets you enter javascript commands at the in-game prompt. To bring up the in-game prompt press the / key then type js followed by any javascript statement. For example: /js 1 + 1 will print 2.

BlocklyCraft started out as a copy/paste of the work of Michael Vorburger & Lauro Canonica for the Devoxx4Kids Lugano event.

BlocklyCraft is based on ScriptCraft, a Minecraft Mod that lets you extend Minecraft using the Javascript Programming Language. ScriptCraft makes modding Minecraft easier. It includes a logo-like "Drone" object that can be used to build complex buildings, roads, villages, even entire cities. It also includes many other features that make modding Minecraft easier.

If you're new to visual programming, I highly recommend to start with

Example

Let's make a 2 floors house in Blockly editor:

House Blockly Command

At the in-game prompt, type:

/jsp house

House

Somehow a sheep and a chicken got interested, they are NOT part of the code above.

Prerequisites

BlocklyCraft Plugin Installation

If you don't want to compile the plugin from source, you can download the compiled plugin here and copy it to the Minecraft server plugins directory.

Post Install

Once installed, a new scriptcraft/plugins directory is automatically created. All files in the scriptcraft/plugins directory will be automatically loaded when the server starts. Only players who are ops can use this plugin. You can grant a player op privileges by typing 'op ' at the server console prompt or by adding the player's username to the ops.txt file in your server directory.

Launch the server, then open http://localhost:7070 in a web browser. Create your first command by following the example below, don't forget to give a name to your command (house in the example) and then click the deploy red button on the top right, this will compile the javascript and install it on the Minecraft server.

Hello Blockly

then launch the Minecraft client and create a new server connection. The IP address will be localhost . Once you've connected to your server and have entered the game, look at a ground-level block and type the name of the newly created command:

/jsp hello

This will create a stone structure 2 blocks wide by 1 block high by 4 blocks long.

Hello Minecraft

A BlockyCraft mod for Minecraft is just a JavaScript source file (.js) located in the scriptcraft/plugins/blocklycraft/ directory.

command( 'hello', function ( parameters, player ) {
    var theDrone = new Drone(player);
    theDrone.up();
    theDrone.chkpt('start');
    var timeoutStop = new Date().getTime()+500;
    theDrone.box ('1',4,1,2);
});

All .js files in this directory will be automatically loaded when the server starts and reloaded each time you deploy from the Blockly visual programming editor

Create a Paddock

Paddock Command Paddock run