/** Adds a new piece to the structure. */
 protected StructureDungeonPieceInst addPiece(StructureDungeonPiece piece, Pos position) {
   StructureDungeonPieceInst inst = new StructureDungeonPieceInst(piece, position);
   generated.add(inst);
   return inst;
 }
 /**
  * Checks whether the area between two points is inside the structure and does not intersect any
  * existing pieces.
  */
 protected boolean canPlaceArea(Pos pos1, Pos pos2) {
   final BoundingBox box = new BoundingBox(pos1, pos2);
   return box.isInside(dungeon.boundingBox)
       && !generated.stream().anyMatch(inst -> inst.boundingBox.intersects(box));
 }