loader = new BLKMechFile(f);
BuildingBlock bb = new BuildingBlock(f.getPath()); if (bb.exists("UnitType")) { String sType = bb.getDataAsString("UnitType")[0]; if (sType.equals("Tank")) { loader = new BLKTankFile(bb); } else if (sType.equals("Mech")) { loader = new BLKMechFile(bb); } else { throw new EntityLoadingException("Unknown UnitType: " + sType); } } else { loader = new BLKMechFile(bb); }
    private void parse(File f) throws EntityLoadingException {        m_file = f;        MechLoader loader;                if (f.getName().toLowerCase().endsWith(".mep")) {            loader = new MepFile(f);        } else if (f.getName().toLowerCase().endsWith(".mtf")) {            loader = new MtfFile(f);        } else if (f.getName().toLowerCase().endsWith(".blk")) {            loader = new BLKMechFile(f);        } else {            throw new EntityLoadingException("Unsupported file suffix");        }                m_mech = loader.getMech();    }