2013-08-26 18:49:32 -04:00
|
|
|
package mekanism.tools.item;
|
2012-08-15 16:41:41 -04:00
|
|
|
|
2012-11-15 15:04:12 -05:00
|
|
|
import java.util.List;
|
|
|
|
|
2012-11-25 10:45:00 -05:00
|
|
|
import mekanism.common.Mekanism;
|
2013-03-18 12:23:57 -04:00
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
2013-07-26 18:16:21 -04:00
|
|
|
import net.minecraft.entity.Entity;
|
2012-12-20 16:53:39 -05:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.EnumArmorMaterial;
|
|
|
|
import net.minecraft.item.ItemArmor;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2012-08-15 16:41:41 -04:00
|
|
|
|
2012-11-05 14:29:04 -05:00
|
|
|
public class ItemMekanismArmor extends ItemArmor
|
2012-08-15 16:41:41 -04:00
|
|
|
{
|
2012-11-29 14:56:38 -05:00
|
|
|
public ItemMekanismArmor(int id, EnumArmorMaterial enumarmormaterial, int renderIndex, int armorType)
|
2012-08-15 16:41:41 -04:00
|
|
|
{
|
2012-11-29 14:56:38 -05:00
|
|
|
super(id, enumarmormaterial, renderIndex, armorType);
|
2012-11-05 14:29:04 -05:00
|
|
|
setCreativeTab(Mekanism.tabMekanism);
|
2012-08-15 16:41:41 -04:00
|
|
|
}
|
|
|
|
|
2012-11-15 15:04:12 -05:00
|
|
|
@Override
|
|
|
|
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
|
|
|
{
|
|
|
|
list.add("HP: " + (itemstack.getMaxDamage() - itemstack.getItemDamage()));
|
|
|
|
}
|
|
|
|
|
2013-03-18 12:23:57 -04:00
|
|
|
@Override
|
2013-04-12 20:25:21 -04:00
|
|
|
public void registerIcons(IconRegister register)
|
2012-11-06 10:44:14 -05:00
|
|
|
{
|
2013-04-12 20:25:21 -04:00
|
|
|
itemIcon = register.registerIcon("mekanism:" + getUnlocalizedName().replace("item.", ""));
|
2012-08-15 16:41:41 -04:00
|
|
|
}
|
2013-07-26 18:16:21 -04:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer)
|
|
|
|
{
|
2013-10-18 07:33:27 -04:00
|
|
|
return "mekanism:armor/" + getArmorMaterial().name().toLowerCase() + "_" + layer + ".png";
|
2013-07-26 18:16:21 -04:00
|
|
|
}
|
2012-08-15 16:41:41 -04:00
|
|
|
}
|