public void updateDrivesCache(){
  if (hasWorldObj() && worldObj.isRemote)   return;
  drives.clear();
  prototypes.clear();
  for (  TileEntityDriveBay tedb : driveBays) {
    if (tedb.isInvalid())     continue;
    for (    ItemStack is : tedb) {
      drives.add(is);
      ItemDrive id=(ItemDrive)is.getItem();
      prototypes.addAll(id.getPrototypes(is));
    }
  }
  Collections.sort(drives,new DriveComparator());
}

public void updateDrivesCache ( ) { if ( hasWorldObj ( ) && worldObj . isRemote ) return ; drives . clear ( ) ; prototypes . clear ( ) ; for ( TileEntityDriveBay tedb : driveBays ) { if ( tedb . isInvalid ( ) ) continue ; for ( ItemStack is : tedb ) { drives . add ( is ) ; ItemDrive id = ( ItemDrive ) is . getItem ( ) ; prototypes . addAll ( id . getPrototypes ( is ) ) ; } } Collections . sort ( drives , new DriveComparator ( ) ) ; }
assumes the network cache is also up to date , if it ' s not , call scannetwork
