2015-11-08 22:42:02 +00:00
|
|
|
package WayofTime.bloodmagic.item.armour;
|
|
|
|
|
2015-11-29 02:25:46 +00:00
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
|
|
|
import WayofTime.bloodmagic.registry.ModItems;
|
2015-11-08 22:42:02 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.item.ItemArmor;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public class ItemLivingArmour extends ItemArmor
|
|
|
|
{
|
|
|
|
public static String[] names = { "helmet", "chest", "legs", "boots" };
|
2015-11-08 22:42:02 +00:00
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public ItemLivingArmour(int armorType)
|
|
|
|
{
|
2015-11-29 02:25:46 +00:00
|
|
|
super(ItemArmor.ArmorMaterial.IRON, 0, armorType);
|
|
|
|
setUnlocalizedName(Constants.Mod.MODID + ".livingArmour.");
|
|
|
|
setMaxDamage(250);
|
|
|
|
setCreativeTab(BloodMagic.tabBloodMagic);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
|
|
|
{
|
|
|
|
if (this == ModItems.livingArmourChest || this == ModItems.livingArmourHelmet || this == ModItems.livingArmourBoots)
|
|
|
|
{
|
2015-11-29 02:25:46 +00:00
|
|
|
return "bloodmagic:models/armor/boundArmour_layer_1.png";
|
|
|
|
}
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
if (this == ModItems.livingArmourLegs)
|
|
|
|
{
|
2015-11-29 02:25:46 +00:00
|
|
|
return "bloodmagic:models/armor/boundArmour_layer_2.png";
|
2015-12-30 20:34:40 +00:00
|
|
|
} else
|
|
|
|
{
|
2015-11-29 02:25:46 +00:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2015-11-08 22:42:02 +00:00
|
|
|
|
2015-11-29 02:25:46 +00:00
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public String getUnlocalizedName(ItemStack stack)
|
|
|
|
{
|
2015-11-08 22:42:02 +00:00
|
|
|
return super.getUnlocalizedName(stack) + names[armorType];
|
|
|
|
}
|
|
|
|
}
|