blob: 8805a6854148fb175b4b0e8195813ac84decdd61 [file] [log] [blame] [raw]
package mekanism.common.item;
import java.util.List;
import mekanism.common.Mekanism;
import mekanism.common.Resource;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class ItemDirtyDust extends ItemMekanism
{
public IIcon[] icons = new IIcon[256];
public ItemDirtyDust()
{
super();
setHasSubtypes(true);
setCreativeTab(Mekanism.tabMekanism);
}
@Override
public void registerIcons(IIconRegister register)
{
for(int i = 0; i < Resource.values().length; i++)
{
icons[i] = register.registerIcon("mekanism:Dirty" + Resource.values()[i].getName() + "Dust");
}
}
@Override
public IIcon getIconFromDamage(int meta)
{
return icons[meta];
}
@Override
public void getSubItems(Item item, CreativeTabs tabs, List itemList)
{
for(int counter = 0; counter < Resource.values().length; counter++)
{
itemList.add(new ItemStack(item, 1, counter));
}
}
@Override
public String getUnlocalizedName(ItemStack item)
{
return "item.dirty" + Resource.values()[item.getItemDamage()].getName() + "Dust";
}
}