package com.kanomiya.mcmod.cradleofnoesis.item;

import java.util.List;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.kanomiya.mcmod.cradleofnoesis.CradleOfNoesis;
import com.kanomiya.mcmod.cradleofnoesis.api.CradleOfNoesisAPI;
import com.kanomiya.mcmod.cradleofnoesis.api.util.EnderEnergyUtils;

/**
 * @author Kanomiya
 *
 */
public class ItemEmeraldTablet extends Item
{
	public ItemEmeraldTablet()
	{
		setRegistryName(new ResourceLocation(CradleOfNoesisAPI.MODID, "itemEmeraldTablet"));
		setUnlocalizedName("itemEmeraldTablet");

		setCreativeTab(CradleOfNoesis.tab);
		setHasSubtypes(true);
	}

	@Override
	public boolean showDurabilityBar(ItemStack stack)
	{
		return 0 < EnderEnergyUtils.getEnderEnergyCapacity(stack);
	}

	@Override
	public double getDurabilityForDisplay(ItemStack stack)
	{
		return 1.0d -(double)EnderEnergyUtils.getEnderEnergyAmount(stack) /(double)EnderEnergyUtils.getEnderEnergyCapacity(stack);
	}

	@Override
	public String getUnlocalizedName(ItemStack stack)
	{
		EnumType[] values = EnumType.values();
		return super.getUnlocalizedName(stack) + (stack.getMetadata() < values.length ? "_" + values[stack.getMetadata()].name().toLowerCase() : "");
	}

	@Override
	@SideOnly(Side.CLIENT)
	public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)
	{
		EnumType[] values = EnumType.values();

		for (int i=0; i<values.length; ++i)
		{
			subItems.add(new ItemStack(itemIn, 1, i));
		}
	}

	public static enum EnumType
	{
		LIA_FALIA,
		LIA_STILIA,
		LIA_REGILIA,
		ARLEY,
		ARMES,
		;

	}





}

@@ -1758,16 +1758,48 @@
 S,%0A%09%09;%0A%0A
+%09%09// TODO: %E5%BE%A9%E5%85%83%E3%81%95%E3%82%8C%E3%81%9F/%E5%8A%A3%E5%8C%96%E3%81%97%E3%81%9F%E3%82%A8%E3%83%A1%E3%83%A9%E3%83%AB%E3%83%89%E3%82%BF%E3%83%96%E3%83%AC%E3%83%83%E3%83%88%0A
 %09%7D%0A%0A%0A%0A%0A%0A

Add todo