Home > magellan

magellan

Magellan is a project mainly written in C++ and RUBY, it's free.

Magellan Minecraft Mapper

Requirements: zlib libpng V8

Currently, some needed libraries are built and linked statically when building on Mac OS X. These need to be downloaded: wget http://zlib.net/zlib-1.2.5.tar.gz wget http://download.sourceforge.net/libpng/libpng-1.4.5.tar.gz make libs

For both Linux and OS X, you'll need to get V8 as well: http://code.google.com/apis/v8/build.html

Follow the directions on that page to download V8 into the Magellan directory and build it. No installation is needed, V8 is statically linked.

Once the needed libraries are in place, the build process for Magellan is simply: make make install

By default, the makefile installs binaries in ~/bin and puts some data files and scripts into a "magellan" directory in the Minecraft directory, the exact location of which depends on platform.

At the core of Magellan is a ECMAScript (JavaScript) interpreter with bindings for loading and writing NBT files, as well as a map loader and renderer. Only low level operations and those which are particularly computationally expensive are built into the binary, high level operations are performed using scripts...the toolkit may thus be customized and extended without a development environment.

Usage: magellan COMMAND [SCRIPTARGS]

The first argument is the script/command to perform, later arguments depend on the script/command being executed. It is first interpreted as a path, and if a file exists at that location it is executed as a command script. If no file exists, the magellan scripts directory is searched next. If there's still no match, a .js extension is added and the scripts directory is searched again. For example:

magellan myscripts/mydumpinv.js 4 magellan dumpinv.js 4 magellan dumpinv 4

The complete set of arguments is passed into the script environment as a global ARGV variable. There is also a MCPATH variable representing the location of the Minecraft folder on the system.

Existing scripts/commands:

ditto INPUT_FILE OUTPUT_FILE Copy input file to output file. Only really useful for testing NBT loading and writing.

dump INPUT_FILE Dump contents of NBT file in human-readable format.

dumpinv WORLD_NUMBER Dump player inventory listing for world.

addinv WORLD_NUMBER INV_ITEM [COUNT] Add item(s) to an open slot in inventory. WORLD_NUMBER INV_ITEM is the name of the item to be added, refer to mcdefs.js for a list. Note that several block types can not be obtained in-game, but are valid inventory items...leaves and the various ores, for example. Some blocks and item types are not valid inventory items, and some inventory items need other data to work...dyes and log blocks use the damage field to store the sub-type, for example.

Example: magellan addinv 4 CoalOre 64

givedyes WORLD_NUMBER Populates the inventory with a full stack of each dye type, if room is available.

undamage WORLD_NUMBER Remove all damage from items in the player inventory.

mcdefs.js Not a script itself, this file contains various definitions used in the other scripts, including the names and numeric IDs of all block and item types. A useful reference for item names.

Demo scripts: maprender.js - map rendering demo, summary of render settings.