Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

There is a HorseArmorType enum you could extend using EnumHelper.

Then your Item would override Item#getHorseArmorType to return your extended enum.

  • 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?

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.