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

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java

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

revision 1532 by torben, Mon Jun 27 18:10:05 2011 UTC revision 1533 by torben, Mon Jun 27 19:34:03 2011 UTC
# Line 17  class Door { Line 17  class Door {
17          Location leftUpper;          Location leftUpper;
18    
19                    
20          Location blocks[][] = new Location[2][2]; // [width][height] - [0][0] == leftUpper          Location blocks[][]; // [width][height] - [0][0] == leftUpper
21    
22          int material;          int material;
23                    
24          int direction;          int direction;
25                    
26          int width = 2;          int width;
27          int height = 2;          int height;
28                    
29    
30          public Door(Block sign) {          public Door(Block sign, int width, int height) {
31                  leftUpper = sign.getLocation().clone();                  leftUpper = sign.getLocation().clone();
32                                    
33                    this.width = width;
34                    this.height = height;
35                    
36                    blocks = new Location[width][height];          
37    
38                  direction = sign.getData() - 2;                  direction = sign.getData() - 2;
39                                    
# Line 64  class Door { Line 68  class Door {
68                  leftUpper  = new Location(w, Integer.parseInt(parts[1]),  Integer.parseInt(parts[2]),  Integer.parseInt(parts[3]) );                  leftUpper  = new Location(w, Integer.parseInt(parts[1]),  Integer.parseInt(parts[2]),  Integer.parseInt(parts[3]) );
69                  direction = Integer.parseInt( parts[4] );                  direction = Integer.parseInt( parts[4] );
70                  material = Integer.parseInt( parts[5] );                  material = Integer.parseInt( parts[5] );
71                    
72                    width = Integer.parseInt( parts[6] );
73                    height = Integer.parseInt( parts[7] );
74                    
75                  loadBlocks();                  loadBlocks();
76          }          }
77                    
# Line 111  class Door { Line 119  class Door {
119                                    
120                  sb.append( ":" + direction );                  sb.append( ":" + direction );
121    
   
122                  sb.append( ":" + material );                  sb.append( ":" + material );
123                    
124                    sb.append( ":" + width );
125                    sb.append( ":" + height );
126    
127                  return sb.toString();                  return sb.toString();
128          }          }

Legend:
Removed from v.1532  
changed lines
  Added in v.1533

  ViewVC Help
Powered by ViewVC 1.1.20