public static void sortMaps () {
        mapPanels.clear();
        maps.removeAll();
        currentMaps.clear();
        int counter = 0;
        selectedMap = 0;
        maps.repaint();
        LaunchFrame.updateMapInstallLocs(new String[] { "" });
        mapInfo.setText("");
        HashMap<Integer, List<Map>> sorted = Maps.newHashMap();
        sorted.put(0, new ArrayList<Map>());
        sorted.put(1, new ArrayList<Map>());
        for (Map map : Map.getMapArray()) {
            if (originCheck(map) && compatibilityCheck(map) && textSearch(map)) {
                if (map.isCompatible(ModPack.getSelectedPack(true).getName())) {
                    sorted.get(1).add(map);
                } else if (map.isCompatible(ModPack.getSelectedPack(false).getName())) {
                    sorted.get(1).add(map);
                } else {
                    sorted.get(0).add(map);
                }
            }
        }
        for (Map map : sorted.get(1)) {
            addMap(map);
            currentMaps.put(counter, map);
            counter++;
        }
        for (Map map : sorted.get(0)) {
            addMap(map);
            currentMaps.put(counter, map);
            counter++;
        }
        updateMaps();
    }