public void parseFile() {
        if (settings.debug) {
            EobLogger.println("Parsing item data");
        }

        int itemsNum = ByteArrayUtility.getWord(itemsData, 0); // first two bytes specifies number of records
        if (settings.debug) {
            EobLogger.println("Found " + itemsNum + " items entries.");
        }

        // Get item names
        int offset = 14 * itemsNum + 2;
        int namesNum = ByteArrayUtility.getWord(itemsData, offset);
        offset += 2;
        if (settings.debug) {
            EobLogger.println("Found " + namesNum + " item names.");
        }
        for (int i = 0; i < namesNum; i++) {
            byte[] nameBytes = Arrays.copyOfRange(itemsData, offset, offset + 34);
            String name = new String(nameBytes);
            ItemName.addItemName((long) i, name.trim());
            offset += 35; // each name takes 35 bytes
        }

        // Get items
        offset = 2;
        for (int itemIndex = 0; itemIndex < itemsNum; itemIndex++) {
            ItemObject itemObject = new ItemObject(itemIndex, Arrays.copyOfRange(itemsData, offset, offset + 14), eobGlobalData.itemTypeDatFile, eobGlobalData);
            offset += 14;

            // Ignore empty objects
            if (itemObject.item.getDescription(true).equals("NULL")) {
                continue;
            }

            items.put(itemIndex, itemObject);
        }

        if (settings.debug) {
            EobLogger.println("Found " + items.size() + " items with unique " + ItemName.itemNames.size() + " names");
        }

        if (settings.showItems) {
            printItems(settings.showOnlyItemName);
        }
    }