Part of the Minds of Chimera Project (dev)
CodeBlocks | MOCPlaytimeTracker | MOCDBLib | RegenBlock | MOCGoodEats | MOC3DImporter | ImageImport | MOCKiosk | MOCRater | MOCFizziks | GravitySheep | MOCChemistry | MOCRegistry

Codeblocks is a plugin that allows you to control a robot by creating programs out of special blocks. The programs are ordered sequences of these blocks. The programming constructs available are: Functions, Looping through recursion, and Branching (If / Else) through Sensing/

Programs are described by a sequence of blocks built from North to South (You can determine which direction you are facing by typing '/cb compass'). The start of a program needs to be a sign which describes the name of the program. The first line needs to be the word 'program' and the second line is the name (See below). The following program is named 'example1' and tells the robot to Move Forward, Turn Left, and Move Forward. To run the program, you would place a robot on the ground and type '/cb run example1'.

Creating a function is much like creating a program; however, instead of the first line of its starting sign having the word 'program', you instead place the name of the program the function belongs to.

To call a function, place a function block with a sign on top. The sign should read the name of the function. You can use shorthand by just writing the name - the system will look for a function with that name belonging to the program. You can also write the full name of the function (this allows you to call functions from other programs - on my server I have a set of 'global' functions that I use in several of my programs). Both of the function calls below reference the same function.

Looping is accomplished through recursion. To have a set of actions repeated, place the actions in a function and put a function call at the end of the function that tells the robot to perform the function again.
Branching (If/Else) can be accomplished with the Sense Block. See above for an explanation.

The system remembers which programs belong to each player. This way, players can have programs and functions with identical names and not conflict. You can manually save your programs so that they will exist on server restart by typing '/cb save'. Additionally, all of the programs are saved when the plugin is disabled (i.e. on a graceful shutdown).
Requires the Spoutcraft client (Uses custom blocks)
codeblocks.all - Gives access to the plugin
The robot will be converted into a dispenser when it is placed on the ground. If you would like to have the robot retain its texture, you can use this texture pack. It is the default texture for Minecraft, with the one change that makes dispensers look like the robot.
http:isue-server.eecs.ucf.edu/CodeBlocks/CodeBlocksTextures.zip
This plugin was created as part of a research project. Upon running 5 programs, players will be prompted with a short survey. The survey must be completed to continue using the system. After 30 programs have been run, the survey will be shown again. Please try to take the survey seriously, we are very interested in your responses.
We are very open to suggestions and feature requests, so if there is something you would like to see added, let us know.