package net.Chipperfluff.chipi.item.armor;

import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Util;
import java.util.EnumMap;
import java.util.Map;

import net.Chipperfluff.chipi.item.ModItems;

public class ChipperArmorMaterial implements ArmorMaterial {

    public static final ChipperArmorMaterial INSTANCE = new ChipperArmorMaterial();

    private static final Map<ArmorItem.Type, Integer> PROTECTION = Util.make(
        new EnumMap<>(ArmorItem.Type.class),
        map -> {
            map.put(ArmorItem.Type.HELMET, 0);
            map.put(ArmorItem.Type.CHESTPLATE, 0);
            map.put(ArmorItem.Type.LEGGINGS, 0);
            map.put(ArmorItem.Type.BOOTS, 0);
        }
    );

    @Override
    public int getDurability(ArmorItem.Type type) {
        return 1_000;
    }

    @Override
    public int getProtection(ArmorItem.Type type) {
        return PROTECTION.get(type);
    }

    @Override
    public int getEnchantability() {
        return 10;
    }

    @Override
    public SoundEvent getEquipSound() {
        return SoundEvents.ITEM_ARMOR_EQUIP_IRON;
    }

    @Override
    public Ingredient getRepairIngredient() {
        return Ingredient.ofItems(ModItems.CHIPPER_INGOT);
    }

    @Override
    public String getName() {
        return "chipi:chipper";
    }

    @Override
    public float getToughness() {
        return 0.0f;
    }

    @Override
    public float getKnockbackResistance() {
        return 0.0f;
    }
}
