package com.vanamod.mod;

import com.vanamod.mod.armor.ItemVanadiumArmor;
import com.vanamod.mod.armor.ItemVoidiumArmor;
import com.vanamod.mod.items.ItemVanadiumSword;
import com.vanamod.mod.items.ItemVoidiumSword;
import com.vanamod.mod.items.ItemVanaApple;
import com.vanamod.mod.items.ItemHangGlider;
import com.vanamod.mod.items.ItemHealStick;
import com.vanamod.mod.items.ItemStrengthStick;
import com.vanamod.mod.items.ItemStickOfGod;
import com.vanamod.mod.items.ItemPotionLauncher;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemSword;
import net.minecraftforge.common.util.EnumHelper;

public class ModItems {

    // Matériaux d'armure
    public static ItemArmor.ArmorMaterial vanadiumArmorMaterial = EnumHelper.addArmorMaterial(
            "VANADIUM",
            33,
            new int[]{3, 8, 6, 2},
            30
    );

    public static ItemArmor.ArmorMaterial voidiumArmorMaterial = EnumHelper.addArmorMaterial(
            "VOIDIUM",
            52,
            new int[]{5, 6, 7, 6},
            35
    );

    // Matériaux d'outils/armes
    public static Item.ToolMaterial vanadiumToolMaterial = EnumHelper.addToolMaterial(
            "VANADIUM",
            3,
            4999,
            8.0F,
            6.0F,
            30
    );

    public static Item.ToolMaterial voidiumToolMaterial = EnumHelper.addToolMaterial(
            "VOIDIUM",
            3,
            4999,
            8.0F,
            7.3F,
            35
    );

    // Items d'armure Vanadium
    public static ItemArmor vanadiumHelmet;
    public static ItemArmor vanadiumChestplate;
    public static ItemArmor vanadiumLeggings;
    public static ItemArmor vanadiumBoots;

    // Items d'armure Voidium
    public static ItemArmor voidiumHelmet;
    public static ItemArmor voidiumChestplate;
    public static ItemArmor voidiumLeggings;
    public static ItemArmor voidiumBoots;

    // Épées
    public static ItemSword vanadiumSword;
    public static ItemSword voidiumSword;

    // Vana Apple
    public static Item vanaApple;

    // Hang Glider
    public static Item hangGlider;

    // Sticks
    public static Item healStick;
    public static Item strengthStick;
    public static Item stickOfGod;

    // Potion Launcher
    public static Item potionLauncher;

    public static void init() {
        // Créer les armures Vanadium
        vanadiumHelmet = new ItemVanadiumArmor(vanadiumArmorMaterial, 0, "vanadium_helmet");
        vanadiumHelmet.setMaxDamage(2860);

        vanadiumChestplate = new ItemVanadiumArmor(vanadiumArmorMaterial, 1, "vanadium_chestplate");
        vanadiumChestplate.setMaxDamage(4160);

        vanadiumLeggings = new ItemVanadiumArmor(vanadiumArmorMaterial, 2, "vanadium_leggings");
        vanadiumLeggings.setMaxDamage(3900);

        vanadiumBoots = new ItemVanadiumArmor(vanadiumArmorMaterial, 3, "vanadium_boots");
        vanadiumBoots.setMaxDamage(3380);

        // Créer les armures Voidium
        voidiumHelmet = new ItemVoidiumArmor(voidiumArmorMaterial, 0, "voidium_helmet");
        voidiumHelmet.setMaxDamage(4400);

        voidiumChestplate = new ItemVoidiumArmor(voidiumArmorMaterial, 1, "voidium_chestplate");
        voidiumChestplate.setMaxDamage(6400);

        voidiumLeggings = new ItemVoidiumArmor(voidiumArmorMaterial, 2, "voidium_leggings");
        voidiumLeggings.setMaxDamage(6000);

        voidiumBoots = new ItemVoidiumArmor(voidiumArmorMaterial, 3, "voidium_boots");
        voidiumBoots.setMaxDamage(5200);

        // Créer les épées
        vanadiumSword = new ItemVanadiumSword(vanadiumToolMaterial, "vanadium_sword");
        voidiumSword = new ItemVoidiumSword(voidiumToolMaterial, "voidium_sword");

        // Créer la Vana Apple
        vanaApple = new ItemVanaApple("vanapple");

        // Créer le Hang Glider
        hangGlider = new ItemHangGlider("hangglider");

        // Créer les Sticks
        healStick = new ItemHealStick("heal_stick");
        strengthStick = new ItemStrengthStick("strength_stick");
        stickOfGod = new ItemStickOfGod("stick_of_god");

        // Créer le Potion Launcher
        potionLauncher = new ItemPotionLauncher("potion_launcher");

        // Enregistrer dans le jeu
        GameRegistry.registerItem(vanadiumHelmet, "vanadium_helmet");
        GameRegistry.registerItem(vanadiumChestplate, "vanadium_chestplate");
        GameRegistry.registerItem(vanadiumLeggings, "vanadium_leggings");
        GameRegistry.registerItem(vanadiumBoots, "vanadium_boots");

        GameRegistry.registerItem(voidiumHelmet, "voidium_helmet");
        GameRegistry.registerItem(voidiumChestplate, "voidium_chestplate");
        GameRegistry.registerItem(voidiumLeggings, "voidium_leggings");
        GameRegistry.registerItem(voidiumBoots, "voidium_boots");

        GameRegistry.registerItem(vanadiumSword, "vanadium_sword");
        GameRegistry.registerItem(voidiumSword, "voidium_sword");

        GameRegistry.registerItem(vanaApple, "vanapple");
        GameRegistry.registerItem(hangGlider, "hangglider");

        GameRegistry.registerItem(healStick, "heal_stick");
        GameRegistry.registerItem(strengthStick, "strength_stick");
        GameRegistry.registerItem(stickOfGod, "stick_of_god");

        GameRegistry.registerItem(potionLauncher, "potion_launcher");
    }
}