package com.acethewildfire.acesbs.item;

import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.item.custom.HammerItem;
import com.acethewildfire.acesbs.item.custom.ModArmorItem;
import net.minecraft.item.*;
import net.minecraft.resource.featuretoggle.FeatureFlags;
import net.minecraft.util.Identifier;

public class AshenSteelItems {

    public static final Item ASHEN_STEEL = ModItems.registerItem("ashen_steel", new Item(new Item.Settings()));
    public static final Item ASHEN_STEEL_SWORD = ModItems.registerItem("ashen_steel_sword",
            new SwordItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(SwordItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 3, -2.4f))));
    public static final Item ASHEN_STEEL_SHOVEL = ModItems.registerItem("ashen_steel_shovel",
            new ShovelItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(ShovelItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 1.5F, -3.0F)))
    );
    public static final Item ASHEN_STEEL_PICKAXE = ModItems.registerItem("ashen_steel_pickaxe",
            new PickaxeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 1.0F, -2.8F)))
    );
    public static final Item ASHEN_STEEL_HAMMER = ModItems.registerItem("ashen_steel_hammer",
            new HammerItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 7.0F, -3.4F)))
    );
    public static final Item ASHEN_STEEL_AXE = ModItems.registerItem("ashen_steel_axe",
            new AxeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(AxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 6.0F, -3.1F)))
    );
    public static final Item ASHEN_STEEL_HOE = ModItems.registerItem("ashen_steel_hoe",
            new HoeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings()
                    .attributeModifiers(HoeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, -2.0F, -1.0F)))
    );
    public static final Item ASHEN_STEEL_HELMET = ModItems.registerItem("ashen_steel_helmet",
            new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.HELMET, new Item.Settings()
                    .maxDamage(ArmorItem.Type.HELMET.getMaxDamage(15))));
    public static final Item ASHEN_STEEL_CHESTPLATE = ModItems.registerItem("ashen_steel_chestplate",
            new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.CHESTPLATE, new Item.Settings()
                    .maxDamage(ArmorItem.Type.CHESTPLATE.getMaxDamage(15))));
    public static final Item ASHEN_STEEL_LEGGINGS = ModItems.registerItem("ashen_steel_leggings",
            new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.LEGGINGS, new Item.Settings()
                    .maxDamage(ArmorItem.Type.LEGGINGS.getMaxDamage(15))));
    public static final Item ASHEN_STEEL_BOOTS = ModItems.registerItem("ashen_steel_boots",
            new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.BOOTS, new Item.Settings()
                    .maxDamage(ArmorItem.Type.BOOTS.getMaxDamage(15))));
    public static final Item ASHEN_SMITHING_TEMPLATE = ModItems.registerItem("ashen_armor_trim_smithing_template",
            SmithingTemplateItem.of(Identifier.of(AcesBS.MOD_ID, "ashen"), FeatureFlags.VANILLA));

    public static void registerAshenItems() {
        // Do nothing, this just makes sure the items get registered
    }
}
