Minecraft is a huge game. The full PC version is especially great because it is customizable with lots of mods available all over the internet. One great new mod is ScriptCraft by Walter Higgins (http://scriptcraftjs.org/). ScriptCraft runs on a bukkit version of the minecraft server. Installation is covered on the ServerCraft site.
ScriptCraft adds JavaScript control of minecraft. Buildings and other objects can be created instantly through the Minecraft command line. Also, this can be a great way to introduce someone into programming for the first time.
Try these samples below. Copy these JavaScript sources to your server and restart it to try them out.
Save as igloo.js and put in your js-plugins\drone folder.
load(__folder + "drone.js")
Drone.extend('igloo', function () {
this.chkpt('igloo');
this.hemisphere0(blocks.snow, 7, 'north');
this.right(2).down(2);
this.back();
this.right(4);
this.up(2);
this.box(0, 2, 3, 2);
return this.move('igloo');
});
Run this by typing in the Minecraft command line:
/js igloo()
Save as enchant_table.js and put in your js-plugins\drone folder.
load(__folder + "drone.js")
Drone.extend('enchant_table', function () {
this.up();
this.box0(blocks.bookshelf, 5, 5, 4);
this.chkpt('enchant_table');
this.up().right();
this.box0(0, 3, 3, 1);
this.move('enchant_table');
this.up().fwd().right(2);
this.box(blocks.table_enchantment);
this.move('enchant_table');
this.box(blocks.bookshelf, 5, 1, 4);
this.up(4);
this.box(blocks.bookshelf, 5, 1, 4);
return this; });
Run this by typing in the Minecraft command line:
/js enchant_table()
Now, you'll have an enchantment table that is fully maxed out.
One of my favorite things to do with this is to use the command to explore and reveal to the world underneath. So to clear out large areas in this snow covered forest, issue a command like down(height/2).box(blocktype, width, height, depth)
with 0
for the block type.
/js down(40).box(0, 20, 70, 120)
Now just look at the giant ravine we've created. This method reveals all sorts of neat areas to explore and is great for mining.
The box(...)
part of the function is what actually clears the area out since we are using air (block 0) as the block. Since box()
always goes up, we need to send the command down with the down(40) command first. Since we are using JavaScript, we can chain the commands together as shown above.
What kind of cool things are you doing? Please send me a note if you've enjoyed this page.
Some of the ScriptCraft built in samples to try:
/js castle()
/js chessboard()
/js cottage()
/js cottage_road()
/js dancefloor()
/js fort()
/js rainbow()
/js temple()
To create with other block types, use the (dec) values from the official Minecraft list: http://www.minecraftwiki.net/wiki/Data_values.