Merge branch 'master' of github.com:walterhiggins/ScriptCraft

This commit is contained in:
walterhiggins 2012-12-27 13:12:54 +00:00
commit 2fedd10768

View file

@ -15,6 +15,7 @@ Minecraft Java API via Javascript as this goes against the current terms of use
As of Dec 27 2012, the ScriptCraft mod includes just a few built-in objects and functions to make building easier. As of Dec 27 2012, the ScriptCraft mod includes just a few built-in objects and functions to make building easier.
* help() - Brings up a short help message. * help() - Brings up a short help message.
* print(message) - prints a message on the command screen. e.g. `/js print(1+3);`
* load('path-to-script.js') - lets you load and execute any javascript source file. Calling load() with no parameters will bring up a File Chooser dialog. (In the context of script files, the $SCRIPT js variable will refer to the current script filename and $SCRIPTPATH refers to the directory in which the current script resides.) * load('path-to-script.js') - lets you load and execute any javascript source file. Calling load() with no parameters will bring up a File Chooser dialog. (In the context of script files, the $SCRIPT js variable will refer to the current script filename and $SCRIPTPATH refers to the directory in which the current script resides.)
* player - the Player object - unfortunately this isn't currently useful as its properties are obfuscated. * player - the Player object - unfortunately this isn't currently useful as its properties are obfuscated.
* world - The minecraft world object - again - all properties are currently obfuscated. * world - The minecraft world object - again - all properties are currently obfuscated.
@ -34,3 +35,14 @@ You'll need to install the Minecraft Coder Pack and be comfortable installing a
You can get the Minecraft Coder Pack here... You can get the Minecraft Coder Pack here...
http://mcp.ocean-labs.de/index.php/Main_Page http://mcp.ocean-labs.de/index.php/Main_Page
... You will need to follow MCP's instructions to decompile your minecraft.jar file, then apply the ServerCommandManager.patch file to the $MCP/src/minecraft/net/minecraft/src/ServerCommandManager.java file.
Then copy the CommandScript.java file to $MCP/src/minecraft/net/minecraft/src/ directory (where $MCP is the location where you've installed Minecraft Coder pack).
Then run ./reobfuscate.sh and follow MCP's instructions for copying the obfuscated files and rebuilding the minecraft.jar file.
Getting Started
===============
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.