Jump to content

[1.12.2] New type of horse armor


Opengbil

Recommended Posts

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?

Link to comment
Share on other sites

 

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;
    }
}

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.