Opengbil Posted May 21, 2019 Share Posted May 21, 2019 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? Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted May 21, 2019 Share Posted May 21, 2019 There is a HorseArmorType enum you could extend using EnumHelper. Then your Item would override Item#getHorseArmorType to return your extended enum. Quote Link to comment Share on other sites More sharing options...
Opengbil Posted May 28, 2019 Author Share Posted May 28, 2019 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? Quote Link to comment Share on other sites More sharing options...
Opengbil Posted May 28, 2019 Author Share Posted May 28, 2019 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; } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.