(Update 2013/01/04 - I've created a Bukkit Plugin as this makes installing the mod much easier - assuming you're running a CraftBukkit server - which I recommend. See [Bukkit Support][buk] for details).
* putBlock( x, y, z, blockId, metaData ) - A function which lets you place a block anywhere (if no coordinates are given the block the player is currently looking at is replaced).
* getBlock( x, y, z ) - returns the blockId and metadata at the given location (if no coordinates are given the cross-hair location is used)
* putSign( String[] texts, x, y, z, blockId, metaData ) - A function which lets you place a sign.
The above primitives can be used to create buildings which would otherwise be time-consuming to create manually.
It is highly recommended using the attached [drone][drone] javascript plugin which provides a fluent API for building.
The Javascript `Drone` class provides a much richer API which can be used to construct buildings. See the attached
* load('path-to-script.js') - lets you load and execute any javascript source file. In the context of script files, the `__script` variable will refer to the current script filename and `__folder` refers to the directory in which the current script resides. In the MCP (Minecraft Coder Pack) version of ScriptCraft, calling `load()` with no parameters will bring up a File Chooser dialog. This feature was removed from the multi-player bukkit version of ScriptCraft.
You will also need to install the Minecraft Coder Pack (CraftBukkit Users - please skip this section and [go here instead][buk]) and be comfortable installing a Minecraft Mod.
You can get the Minecraft Coder Pack here...
http://mcp.ocean-labs.de/index.php/Main_Page
... You will need to follow MCP's instructions to decompile your minecraft.jar file.
6. Run `reobfuscate.bat` (windows) or `./reobfuscate.sh` (Linux/Mac).
7. Follow MCP's instructions for copying the obfuscated files and rebuilding the minecraft.jar file that is in %appdata%/minecraft/bin (windows), ~/Library/Application Support/Minecraft/bin (Mac) or ~/.minecraft/bin (Linux).
Once you've installed the mod, launch Minecraft and type `/js load()` and load the `cottage.js` file. Once the cottage.js file is loaded you can create a new cottage by typing `/js cottage()`.
Take a look over the cottage.js file to see how the Drone module can be used to easily create buildings. You can even create a whole row of cottages using the following in-game command...
The above code creates a new `Drone` object and uses a `for` loop to create multiple cottages. Keep a Minecraft Block reference handy - there's one here ...