private void loadResourceTypes(String fn) {
        String line;
        String parts[];

        try {
            InputStream in = getClass().getResourceAsStream(GameController.CONFIG_DIR + fn);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));

            int mapLevel = 1;
            String name = "";
            String type = "";
            int qtyMin = 0;
            int qtyMax = 0;
            int gatherTime = 0;
            int[] levels;
            boolean isHeader = true;

            ResourceType rt;
            levels = new int[5];

            while ((line = br.readLine()) != null) {
                if (line.length() == 0) {
                    continue;
                }
                if (line.startsWith("//")) {
                    continue;
                }

                if (isHeader) {
                    parts = line.split(" ");
                    if (parts.length != 5) {
                        System.out.println("Error in " + fn + " (" + parts.length + ")");
                    }

                    name = parts[0];
                    type = parts[1];
                    qtyMin = Integer.parseInt(parts[2]);
                    qtyMax = Integer.parseInt(parts[3]);
                    gatherTime = Integer.parseInt(parts[4]);

                    isHeader = false;
                    mapLevel = 0;
                    levels = new int[5];
                } else {
                    levels[mapLevel] = Integer.parseInt(line);

                    if (mapLevel >= 4) {
                        rt = new ResourceType(this, registry, name, type, qtyMin, qtyMax, gatherTime, levels);
                        resourceTypes.add(rt);
                        isHeader = true;
                    }
                    mapLevel++;
                }
            }
            in.close();
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }