/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TemplateCommand.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TemplateCommand.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1749 by torben, Sun Mar 18 11:46:05 2012 UTC revision 1750 by torben, Sun Mar 18 14:36:49 2012 UTC
# Line 73  public class TemplateCommand implements Line 73  public class TemplateCommand implements
73                          return true;                          return true;
74                  }                  }
75    
76                  buildTemplate( player.getLocation(),  template);                  buildTemplate( player.getLocation(),  template, 1);
77                    buildTemplate( player.getLocation(),  template, 2);
78    
79                  return false;                  return false;
80          }          }
# Line 175  public class TemplateCommand implements Line 176  public class TemplateCommand implements
176    
177          }          }
178    
179          void buildTemplate(Location loc, Pair[][][] template) {          void buildTemplate(Location loc, Pair[][][] template, int pass) {
180                  World world = loc.getWorld();                  World world = loc.getWorld();
181                  for (int i=0; i<template.length; i++ ) {                  for (int i=0; i<template.length; i++ ) {
182                          for (int j=0; j<template[0].length; j++) {                          for (int j=0; j<template[0].length; j++) {
# Line 193  public class TemplateCommand implements Line 194  public class TemplateCommand implements
194    
195                                          //plugin.getLogger().info(  String.format(  "Setting typeid at %d,%d,%d  to %d", x,y,z, type)  );                                          //plugin.getLogger().info(  String.format(  "Setting typeid at %d,%d,%d  to %d", x,y,z, type)  );
196    
197                                            if (pass == 1) {
198                                                    if ( type == 50 || type == 75 || type == 76) //torch / redstone torch                                                  
199                                                            continue;
200                                                    if (type == 64 || type==71) //door / irondoor
201                                                            continue;
202                                                    if (type == 68) // sign
203                                                            continue;
204                                            }
205                                                                                    
206                                          world.getBlockAt(x, y, z).setTypeIdAndData(type, data, true);                                          world.getBlockAt(x, y, z).setTypeIdAndData(type, data, true);
207                                            
208                                  }                                  }
209                          }                          }
210                  }                  }

Legend:
Removed from v.1749  
changed lines
  Added in v.1750

  ViewVC Help
Powered by ViewVC 1.1.20