--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TemplateCommand.java 2012/03/19 08:59:33 1753 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TemplateCommand.java 2012/03/19 15:03:47 1757 @@ -122,6 +122,10 @@ if (line.charAt(0) == '-') continue; + + if ( y >= ysize) { + throw new Exception( "Template: found more levels in file than specified in header" ); + } String elements[] = line.split(","); if (elements.length != zsize) { @@ -214,6 +218,10 @@ int type = template[i][j][k].id; byte data = (byte) template[i][j][k].subId; + + if (type == -1) { + continue; + } //plugin.getLogger().info( String.format( "Setting typeid at %d,%d,%d to %d", x,y,z, type) ); @@ -224,6 +232,10 @@ continue; if (type == 68) // sign continue; + if (type == 65) // ladder + continue; + if (type == 67) // steps + continue; } world.getBlockAt(x, y, z).setTypeIdAndData(type, data, true);