Posted May 21, 20196 yr I am trying to create a new type of horse armor and can't find which class should I extend. What is the proper class for this?
May 21, 20196 yr There is a HorseArmorType enum you could extend using EnumHelper. Then your Item would override Item#getHorseArmorType to return your extended enum.
May 28, 20196 yr Author On 5/21/2019 at 9:30 PM, V0idWa1k3r said: There is a HorseArmorType enum you could extend using EnumHelper. Then your Item would override Item#getHorseArmorType to return your extended enum. I override but when I am unable to add my custon armor to the HorseArmorType enum. This is the line that should add to the enum: public static final HorseArmorType HORSECRAFT_HORSEARMOR = EnumHelper.addHorseArmor(Reference.MODID + ":" + "horsecraft_horsearmor", Reference.MODID + ":" + "horsecraft", 500); What am I missing here?
May 28, 20196 yr Author public class WoodHorseArmor extends Item{ public static final HorseArmorType HORSECRAFT_HORSEARMOR = EnumHelper.addHorseArmor("WOOD", Reference.MODID + ":" + "items/woodhorsearmor", 500); public WoodHorseArmor(){ setCreativeTab(CreativeTabs.COMBAT); setUnlocalizedName(Reference.MODID + "." + "woodhorsearmor"); setRegistryName("woodhorsearmor"); } @Override public HorseArmorType getHorseArmorType(ItemStack stack){ return HorseArmorType.WOOD; } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.