if (mech.getCritical(loc, slot) != null) { continue; }
    public Entity getEntity() throws EntityLoadingException {        try {            Mech mech;                        if ("Quad".equals(chassisType.trim())) {                mech = new QuadMech();            } else {                mech = new BipedMech();            }                        int firstSpace = this.name.indexOf(" ");            if (firstSpace != -1) {                mech.setChassis(this.name.substring(firstSpace).trim());                mech.setModel(this.name.substring(5, firstSpace).trim());            } else {                mech.setChassis(this.name.substring(5).trim());                mech.setModel(this.name.substring(5).trim());            }                        mech.setWeight((float)Integer.decode(this.tonnage.trim()).intValue());            mech.setYear(Integer.parseInt(this.techYear.trim()));            mech.setOmni("OmniMech".equals(this.chassisType.trim()));                        //TODO: this ought to be a better test            if ("InnerSphere".equals(this.innerSphere.trim())) {                if (mech.getYear() == 3025) {                    mech.setTechLevel(TechConstants.T_IS_LEVEL_1);                } else {                    mech.setTechLevel(TechConstants.T_IS_LEVEL_2);                }            } else {                mech.setTechLevel(TechConstants.T_CLAN_LEVEL_2);            }                        if ("XL".equals(this.engineType.trim())) {                mech.giveXL();            }                        mech.setOriginalWalkMP(Integer.parseInt(this.walkMP.trim()));            mech.setOriginalJumpMP(Integer.parseInt(this.jumpMP.trim()));                        boolean dblSinks = "Double".equals(this.heatSinkType.trim());            mech.addEngineSinks(Integer.parseInt(this.heatSinks.trim()), dblSinks);                        decodeArmorAndInternals(mech, Mech.LOC_HEAD, headArmor);            decodeArmorAndInternals(mech, Mech.LOC_LARM, larmArmor);            decodeArmorAndInternals(mech, Mech.LOC_LT, ltArmor);            decodeRearArmor(mech, Mech.LOC_LT, ltrArmor);            decodeArmorAndInternals(mech, Mech.LOC_CT, ctArmor);            decodeRearArmor(mech, Mech.LOC_CT, ctrArmor);            decodeArmorAndInternals(mech, Mech.LOC_RT, rtArmor);            decodeRearArmor(mech, Mech.LOC_RT, rtrArmor);            decodeArmorAndInternals(mech, Mech.LOC_RARM, rarmArmor);            decodeArmorAndInternals(mech, Mech.LOC_RLEG, rlegArmor);            decodeArmorAndInternals(mech, Mech.LOC_LLEG, llegArmor);                        // remove arm actuators            for (int i = 0; i < equipData.length; i++) {                String eqName = new String(equipData[i]);                eqName = eqName.substring(5, 28).trim();                                if (eqName.equals("No Lower Right Arm")) {                    mech.removeCriticals(Mech.LOC_RARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_LOWER_ARM));                    mech.removeCriticals(Mech.LOC_RARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_HAND));                } else if (eqName.equals("No Lower Left Arm")) {                    mech.removeCriticals(Mech.LOC_LARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_LOWER_ARM));                    mech.removeCriticals(Mech.LOC_LARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_HAND));                } else if (eqName.equals("No Right Hand")) {                    mech.removeCriticals(Mech.LOC_RARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_HAND));                } else if (eqName.equals("No Left Hand")) {                    mech.removeCriticals(Mech.LOC_LARM, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_HAND));                }            }                        // hmm, what to do with the rest of equipment list... I dunno.                        // prefix is "Clan " or "IS "            String prefix;            if (mech.getTechLevel() == TechConstants.T_CLAN_LEVEL_2) {                prefix = "Clan ";            } else {                prefix = "IS ";            }                        // parse the critical hit slots            for (int i = 0; i < critData.length; i++) {                int loc = mech.getLocationFromAbbr(critData[i].substring(3, 5));                int slot = Integer.parseInt(critData[i].substring(5, 7));                boolean rearMounted = false;                String critName = critData[i].substring(7).trim();                                if (critName.startsWith("(R)")) {                    rearMounted = true;                    critName = critName.substring(3).trim();                }                                // this is a bit a kludge, but MEP is stupid                if (critName.equals("Heat Sink") && dblSinks) {                    critName = "Double Heat Sink";                }                                EquipmentType etype = EquipmentType.get(critName);                if (etype == null) {                    // try w/ prefix                    etype = EquipmentType.get(prefix + critName);                }                if (etype != null) {                    try {                        mech.addEquipment(etype, loc, rearMounted);                    } catch (LocationFullException ex) {                       throw new EntityLoadingException(ex.getMessage());                    }                } else {                    if (!critName.equals("-----------------")) {                        // Can't load this piece of equipment!                        mech.addFailedEquipment(critName);                    }                }            }                        if (mech.isClan()) {                mech.addClanCase();            }                        return mech;        } catch (NumberFormatException ex) {            throw new EntityLoadingException("NumberFormatException parsing file");        } catch (NullPointerException ex) {            throw new EntityLoadingException("NullPointerException parsing file");        }    }