import * as mc from "@minecraft/server";
export const MOB_EQUIPMENT = {
    "slot.armor.head": [
        "minecraft:leather_helmet",
        "minecraft:chainmail_helmet",
        "minecraft:iron_helmet",
        "minecraft:golden_helmet",
        "minecraft:diamond_helmet",
        "minecraft:netherite_helmet",
    ],
    "slot.armor.chest": [
        "minecraft:leather_chestplate",
        "minecraft:chainmail_chestplate",
        "minecraft:iron_chestplate",
        "minecraft:golden_chestplate",
        "minecraft:diamond_chestplate",
        "minecraft:netherite_chestplate",
    ],
    "slot.armor.legs": [
        "minecraft:leather_leggings",
        "minecraft:chainmail_leggings",
        "minecraft:iron_leggings",
        "minecraft:golden_leggings",
        "minecraft:diamond_leggings",
        "minecraft:netherite_leggings",
    ],
    "slot.armor.feet": [
        "minecraft:leather_boots",
        "minecraft:chainmail_boots",
        "minecraft:iron_boots",
        "minecraft:golden_boots",
        "minecraft:diamond_boots",
        "minecraft:netherite_boots",
    ],
    "slot.weapon.mainhand": [
        "minecraft:crossbow",
        "minecraft:trident",
        "minecraft:bow",
        "minecraft:wooden_sword",
        "minecraft:stone_sword",
        "minecraft:iron_sword",
        "minecraft:golden_sword",
        "minecraft:diamond_sword",
        "minecraft:netherite_sword",
        "minecraft:wooden_axe",
        "minecraft:stone_axe",
        "minecraft:iron_axe",
        "minecraft:golden_axe",
        "minecraft:diamond_axe",
        "minecraft:netherite_axe",
        "minecraft:wooden_pickaxe",
        "minecraft:stone_pickaxe",
        "minecraft:iron_pickaxe",
        "minecraft:golden_pickaxe",
        "minecraft:diamond_pickaxe",
        "minecraft:netherite_pickaxe",
        "minecraft:iron_shovel",
    ],
};
export function getEquipmentCount(entity) {
    var _a;
    let count = 0;
    for (const slot in [mc.EquipmentSlot.Chest, mc.EquipmentSlot.Head, mc.EquipmentSlot.Legs, mc.EquipmentSlot.Feet, mc.EquipmentSlot.Mainhand, mc.EquipmentSlot.Offhand]) {
        const equipment = (_a = entity.Equipment) === null || _a === void 0 ? void 0 : _a.getEquipment(slot);
        if (equipment) {
            count++;
        }
    }
    return count;
}
