package common.init;

import common.item.Item;
import common.item.ItemAmmo;
import common.item.ItemArmor;
import common.item.ItemBow;
import common.item.ItemEnchantedBook;
import common.item.ItemFishingRod;
import common.item.ItemPotion;
import common.item.ItemShears;


public abstract class Items {
    public static final Item iron_shovel = get("iron_shovel");
    public static final Item iron_pickaxe = get("iron_pickaxe");
    public static final Item iron_axe = get("iron_axe");
    public static final Item flint_and_steel = get("flint_and_steel");
    public static final Item apple = get("apple");
    public static final ItemBow bow = (ItemBow)get("bow");
    public static final Item arrow = get("arrow");
    public static final Item coal = get("coal");
    public static final Item diamond = get("diamond");
    public static final Item iron_ingot = get("iron_ingot");
    public static final Item gold_ingot = get("gold_ingot");
    public static final Item iron_sword = get("iron_sword");
    public static final Item wood_sword = get("wood_sword");
    public static final Item wood_shovel = get("wood_shovel");
    public static final Item wood_pickaxe = get("wood_pickaxe");
    public static final Item wood_axe = get("wood_axe");
    public static final Item stone_sword = get("stone_sword");
    public static final Item stone_shovel = get("stone_shovel");
    public static final Item stone_pickaxe = get("stone_pickaxe");
    public static final Item stone_axe = get("stone_axe");
    public static final Item diamond_sword = get("diamond_sword");
    public static final Item diamond_shovel = get("diamond_shovel");
    public static final Item diamond_pickaxe = get("diamond_pickaxe");
    public static final Item diamond_axe = get("diamond_axe");
    public static final Item stick = get("stick");
    public static final Item bowl = get("bowl");
    public static final Item mushroom_stew = get("mushroom_stew");
    public static final Item gold_sword = get("gold_sword");
    public static final Item gold_shovel = get("gold_shovel");
    public static final Item gold_pickaxe = get("gold_pickaxe");
    public static final Item gold_axe = get("gold_axe");
    public static final Item string = get("string");
    public static final Item feather = get("feather");
    public static final Item gunpowder = get("gunpowder");
    public static final Item wood_hoe = get("wood_hoe");
    public static final Item stone_hoe = get("stone_hoe");
    public static final Item iron_hoe = get("iron_hoe");
    public static final Item diamond_hoe = get("diamond_hoe");
    public static final Item gold_hoe = get("gold_hoe");
    public static final Item wheat = get("wheat");
    public static final Item wheats = get("wheats");
    public static final Item bread = get("bread");
    public static final ItemArmor leather_helmet = (ItemArmor)get("leather_helmet");
    public static final ItemArmor leather_chestplate = (ItemArmor)get("leather_chestplate");
    public static final ItemArmor leather_leggings = (ItemArmor)get("leather_leggings");
    public static final ItemArmor leather_boots = (ItemArmor)get("leather_boots");
    public static final ItemArmor chain_helmet = (ItemArmor)get("chain_helmet");
    public static final ItemArmor chain_chestplate = (ItemArmor)get("chain_chestplate");
    public static final ItemArmor chain_leggings = (ItemArmor)get("chain_leggings");
    public static final ItemArmor chain_boots = (ItemArmor)get("chain_boots");
    public static final ItemArmor iron_helmet = (ItemArmor)get("iron_helmet");
    public static final ItemArmor iron_chestplate = (ItemArmor)get("iron_chestplate");
    public static final ItemArmor iron_leggings = (ItemArmor)get("iron_leggings");
    public static final ItemArmor iron_boots = (ItemArmor)get("iron_boots");
    public static final ItemArmor diamond_helmet = (ItemArmor)get("diamond_helmet");
    public static final ItemArmor diamond_chestplate = (ItemArmor)get("diamond_chestplate");
    public static final ItemArmor diamond_leggings = (ItemArmor)get("diamond_leggings");
    public static final ItemArmor diamond_boots = (ItemArmor)get("diamond_boots");
    public static final ItemArmor gold_helmet = (ItemArmor)get("gold_helmet");
    public static final ItemArmor gold_chestplate = (ItemArmor)get("gold_chestplate");
    public static final ItemArmor gold_leggings = (ItemArmor)get("gold_leggings");
    public static final ItemArmor gold_boots = (ItemArmor)get("gold_boots");
    public static final Item flint = get("flint");
    public static final Item porkchop = get("porkchop");
    public static final Item cooked_porkchop = get("cooked_porkchop");
//    public static final Item painting = get("painting");
    public static final Item golden_apple = get("golden_apple");
    public static final Item sign = get("sign");
    public static final Item oak_door = get("oak_door");
    public static final Item spruce_door = get("spruce_door");
    public static final Item birch_door = get("birch_door");
    public static final Item jungle_door = get("jungle_door");
    public static final Item acacia_door = get("acacia_door");
    public static final Item dark_oak_door = get("dark_oak_door");
    public static final Item bucket = get("bucket");
    public static final Item water_bucket = get("water_bucket");
//    public static final Item lava_bucket = get("lava_bucket");
//    public static final Item fluid_bucket = get("fluid_bucket");
    public static final Item minecart = get("minecart");
    public static final Item saddle = get("saddle");
    public static final Item iron_door = get("iron_door");
    public static final Item redstone = get("redstone");
    public static final Item snowball = get("snowball");
    public static final Item boat = get("boat");
    public static final Item leather = get("leather");
    public static final Item milk_bucket = get("milk_bucket");
    public static final Item brick = get("brick");
    public static final Item clay_ball = get("clay_ball");
    public static final Item reeds = get("reeds");
    public static final Item paper = get("paper");
    public static final Item book = get("book");
    public static final Item slime_ball = get("slime_ball");
    public static final Item chest_minecart = get("chest_minecart");
//    public static final Item furnace_minecart = get("furnace_minecart");
    public static final Item egg = get("egg");
    public static final Item navigator = get("navigator");
    public static final ItemFishingRod fishing_rod = (ItemFishingRod)get("fishing_rod");
//    public static final Item clock = get("clock");
    public static final Item glowstone_dust = get("glowstone_dust");
    public static final Item fish = get("fish");
    public static final Item cooked_fish = get("cooked_fish");
    public static final Item dye = get("dye");
    public static final Item bone = get("bone");
    public static final Item sugar = get("sugar");
    public static final Item cake = get("cake");
//    public static final Item red_bed = get("red_bed");
    public static final Item repeater = get("repeater");
    public static final Item cookie = get("cookie");
    public static final ItemShears iron_shears = (ItemShears)get("iron_shears");
    public static final Item melon = get("melon");
    public static final Item pumpkin_stem = get("pumpkin_stem");
    public static final Item melon_stem = get("melon_stem");
    public static final Item beef = get("beef");
    public static final Item cooked_beef = get("cooked_beef");
    public static final Item chicken = get("chicken");
    public static final Item cooked_chicken = get("cooked_chicken");
    public static final Item rotten_flesh = get("rotten_flesh");
    public static final Item orb = get("orb");
    public static final Item blaze_rod = get("blaze_rod");
    public static final Item ghast_tear = get("ghast_tear");
    public static final Item gold_nugget = get("gold_nugget");
    public static final Item soul_wart = get("soul_wart");
    public static final ItemPotion potion = (ItemPotion)get("potion");
    public static final Item glass_bottle = get("glass_bottle");
    public static final Item spider_eye = get("spider_eye");
    public static final Item fermented_spider_eye = get("fermented_spider_eye");
    public static final Item blaze_powder = get("blaze_powder");
    public static final Item magma_cream = get("magma_cream");
    public static final Item brewing_stand = get("brewing_stand");
    public static final Item cauldron = get("cauldron");
    public static final Item charged_orb = get("charged_orb");
    public static final Item speckled_melon = get("speckled_melon");
//    public static final Item spawn_egg = get("spawn_egg");
    public static final Item experience_bottle = get("experience_bottle");
    public static final Item fire_charge = get("fire_charge");
    public static final Item writable_book = get("writable_book");
    public static final Item written_book = get("written_book");
    public static final Item emerald = get("emerald");
//    public static final Item item_frame = get("item_frame");
    public static final Item flower_pot = get("flower_pot");
    public static final Item carrot = get("carrot");
    public static final Item potato = get("potato");
    public static final Item baked_potato = get("baked_potato");
    public static final Item poisonous_potato = get("poisonous_potato");
    public static final Item golden_carrot = get("golden_carrot");
    public static final Item skull = get("skull");
    public static final Item carrot_on_a_stick = get("carrot_on_a_stick");
    public static final Item charge_crystal = get("charge_crystal");
    public static final Item pumpkin_pie = get("pumpkin_pie");
    public static final Item fireworks = get("fireworks");
    public static final Item firework_charge = get("firework_charge");
    public static final ItemEnchantedBook enchanted_book = (ItemEnchantedBook)get("enchanted_book");
    public static final Item comparator = get("comparator");
    public static final Item bloodbrick = get("bloodbrick");
    public static final Item quartz = get("quartz");
    public static final Item tnt_minecart = get("tnt_minecart");
    public static final Item hopper_minecart = get("hopper_minecart");
    public static final Item iron_horse_armor = get("iron_horse_armor");
    public static final Item gold_horse_armor = get("gold_horse_armor");
    public static final Item diamond_horse_armor = get("diamond_horse_armor");
    public static final Item lead = get("lead");
    public static final Item name_tag = get("name_tag");
    public static final Item record_13 = get("record_13");
    public static final Item record_cat = get("record_cat");
    public static final Item record_blocks = get("record_blocks");
    public static final Item record_chirp = get("record_chirp");
    public static final Item record_far = get("record_far");
    public static final Item record_mall = get("record_mall");
    public static final Item record_mellohi = get("record_mellohi");
    public static final Item record_stal = get("record_stal");
    public static final Item record_strad = get("record_strad");
    public static final Item record_ward = get("record_ward");
    public static final Item record_11 = get("record_11");
    public static final Item record_wait = get("record_wait");
    public static final Item record_delay = get("record_delay");
    public static final Item record_extend = get("record_extend");
    public static final Item banner = get("banner");

    public static final Item portal_frame = get("portal_frame");

    public static final Item dynamite = get("dynamite");
    public static final Item cherry_door = get("cherry_door");
    public static final Item maple_door = get("maple_door");
    public static final ItemShears diamond_shears = (ItemShears)get("diamond_shears");

    public static final Item thi_fragment = get("thi_fragment");
    public static final Item ahrd_fragment = get("ahrd_fragment");
    public static final Item ghi_fragment = get("ghi_fragment");
    public static final Item nieh_fragment = get("nieh_fragment");

//    public static final Item npc_spawner = get("npc_spawner");
    public static final Item wand = get("wand");
//    public static final Item navigator = get("navigator");

    public static final Item copper_ingot = get("copper_ingot");
    public static final Item tin_ingot = get("tin_ingot");
    public static final Item aluminium_ingot = get("aluminium_ingot");
    public static final Item lead_ingot = get("lead_ingot");
    public static final Item nickel_ingot = get("nickel_ingot");
    public static final Item cobalt_ingot = get("cobalt_ingot");
    public static final Item neodymium_ingot = get("neodymium_ingot");

    public static final Item die = get("die");
    public static final Item lightning_wand = get("lightning_wand");
    public static final Item info_wand = get("info_wand");
    public static final Item key = get("key");
    public static final Item ruby = get("ruby");
    public static final Item chick_magnet = get("chick_magnet");
    public static final Item magnet = get("magnet");
    public static final Item cinnabar = get("cinnabar");
    public static final Item chain = get("chain");
    public static final Item camera = get("camera");
    public static final Item boltgun = get("boltgun");
    public static final ItemAmmo bolt = (ItemAmmo)get("bolt");
    
    private static Item get(String id) {
    	if(!ItemRegistry.REGISTRY.containsKey(id))
			throw new RuntimeException("Item " + id + " does not exist!");
		return ItemRegistry.REGISTRY.getObject(id);
    }

//    static {
//    	for(Field field : Items.class.getDeclaredFields()) {
//    		if(Item.class.isAssignableFrom(field.getType())) {
//    			if(!ItemRegistry.REGISTRY.containsKey(field.getName())) {
//    				throw new RuntimeException("Item " + field.getName() + " does not exist!");
//    			}
//    			Item item = ItemRegistry.REGISTRY.getObject(field.getName());
//    			try {
//					field.set(null, item);
//				}
//				catch(IllegalArgumentException | IllegalAccessException e) {
//					throw new RuntimeException(e);
//				}
//    		}
//    	}
//    }
}
