This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importPackage(Packages.com.sk89q.worldedit.blocks); | |
importPackage(Packages.com.sk89q.worldedit); | |
//joins up blocks in the dimension dim | |
function squash(blockarray, dim, arraysize){ | |
var i = new Array(); | |
var dims = new Array(); | |
for (var y = 0; y <= arraysize*2; y++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Some handy utility functions I came up with working with Minecraft craftscripts | |
*/ | |
// exec | |
// performs a java exec by getting the java runtime by name | |
exec = function name(cmd){ | |
var cRuntime = java.lang.Class.forName("java.lang.Runtime"); | |
var mGetRuntime = cRuntime.getMethod("getRuntime"); |