BiomesOPlenty/common/biomesoplenty/armor/ArmorMuddy.java

43 lines
1.5 KiB
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.armor;
import net.minecraft.client.renderer.texture.IconRegister;
2013-07-01 00:31:34 +00:00
import net.minecraft.entity.Entity;
2013-05-03 13:00:44 +00:00
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
2013-07-01 00:31:34 +00:00
public class ArmorMuddy extends ItemArmor
2013-05-03 13:00:44 +00:00
{
public int textureID = 0;
2013-05-31 10:34:02 +00:00
2013-07-01 00:31:34 +00:00
public ArmorMuddy(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
{
2013-05-03 13:00:44 +00:00
super(par1, par2EnumArmorMaterial, par3, par4);
textureID = par4;
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
2013-05-31 10:34:02 +00:00
@Override
2013-08-16 10:00:45 +00:00
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
2013-07-01 00:31:34 +00:00
{
if (stack.itemID == Items.helmetMud.get().itemID || stack.itemID == Items.chestplateMud.get().itemID || stack.itemID == Items.bootsMud.get().itemID)
return "biomesoplenty:textures/armor/mud_1.png";
2013-07-01 00:31:34 +00:00
if (stack.itemID == Items.leggingsMud.get().itemID)
return "biomesoplenty:textures/armor/mud_2.png";
2013-07-01 00:31:34 +00:00
2013-05-03 13:00:44 +00:00
return null;
}
2013-05-31 10:34:02 +00:00
@Override
2013-05-03 13:00:44 +00:00
public void registerIcons(IconRegister iconRegister)
{
if (textureID == 0) { itemIcon = iconRegister.registerIcon("biomesoplenty:mudhelmet"); }
else if (textureID == 1) { itemIcon = iconRegister.registerIcon("biomesoplenty:mudchestplate"); }
else if (textureID == 2) { itemIcon = iconRegister.registerIcon("biomesoplenty:mudleggings"); }
else if (textureID == 3) { itemIcon = iconRegister.registerIcon("biomesoplenty:mudboots"); }
else { itemIcon = iconRegister.registerIcon("biomesoplenty:mudball"); }
2013-05-03 13:00:44 +00:00
}
}