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

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

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

revision 1533 by torben, Mon Jun 27 19:34:03 2011 UTC revision 1535 by torben, Wed Jun 29 14:57:08 2011 UTC
# Line 27  class Door { Line 27  class Door {
27          int height;          int height;
28                    
29    
30          public Door(Block sign, int width, int height) {          public Door(Block sign, int width, int height, DoorStorage store) throws ConflictingDoorException{
31                  leftUpper = sign.getLocation().clone();                  leftUpper = sign.getLocation().clone();
32                                    
33                  this.width = width;                  this.width = width;
# Line 57  class Door { Line 57  class Door {
57                  material = leftUpper.getBlock().getTypeId();                  material = leftUpper.getBlock().getTypeId();
58                                    
59                  loadBlocks();                  loadBlocks();
60                    
61                    
62                    for (int w=0; w<width; w++) {
63                            for (int h=0; h<height; h++) {
64                                    Door d = store.findDoor( blocks[w][h] );
65                                    if (d != null) {
66                                            throw new ConflictingDoorException();
67                                    }
68                            }
69                    }
70    
71          }          }
72    
# Line 71  class Door { Line 81  class Door {
81                                    
82                  width = Integer.parseInt( parts[6] );                  width = Integer.parseInt( parts[6] );
83                  height = Integer.parseInt( parts[7] );                  height = Integer.parseInt( parts[7] );
84    
85    
86                    blocks = new Location[width][height];          
87                                    
88                  loadBlocks();                  loadBlocks();
89          }          }
# Line 162  class Door { Line 175  class Door {
175                  }                  }
176          }          }
177    
 }  
178    }

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

  ViewVC Help
Powered by ViewVC 1.1.20