I am making a custom armor, and in my armor class I am getting this error:
The method getArmorTexture(ItemStack, Entity, int, int) of type ArmorE must override or implement a supertype method
Why I am getting this error?
Here's my code:
Armor Class:
package com.domoq.EmeraldGear.armor;
import com.domoq.EmeraldGear.EmeraldGearMod;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class ArmorE extends ItemArmor {
public ArmorE(ArmorMaterial part2ArmorE, int part3, int part4) {
super(part2ArmorE, part3, part4);
this.setCreativeTab(CreativeTabs.tabCombat);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int type) {
if (stack.getItem() == EmeraldGearMod.EmeraldHelmet || stack.getItem() == EmeraldGearMod.EmeraldChest || stack.getIconIndex() == EmeraldGearMod.EmeraldBoots) {
return "emeraldgearmod:textures/models/armor/ArmorL1.png";
} else if (stack.getItem() == EmeraldGearMod.EmeraldLegs) {
return "emeraldgearmod:textures/models/armor/ArmorL2.png";
} else return null;
}
}
Part of Main Class:
//Armor Material
public static ArmorMaterial ArmorE = EnumHelper.addArmorMaterial("AEmerald", 29, new int[]{3, 7, 4, 2}, 25);
//Armor Items
public static Item EmeraldHelmet = new ArmorE(ArmorE, 2, 0).setUnlocalizedName("EmeraldHelmet").setTextureName("emeraldgearmod:emerald_helmet");
public static Item EmeraldChest = new ArmorE(ArmorE, 2, 1).setUnlocalizedName("EmeraldChest").setTextureName("emeraldgearmod:emerald_chestplate");
public static Item EmeraldLegs = new ArmorE(ArmorE, 2, 2).setUnlocalizedName("EmeraldLegs").setTextureName("emeraldgearmod:emerald_leggings");
public static Item EmeraldBoots = new ArmorE(ArmorE, 2, 3).setUnlocalizedName("EmeraldBoots").setTextureName("emeraldgearmod:emerald_boots");
If you are using Eclipse, try closing and opening it again. The error goes away.