Jump to content

Recommended Posts

Posted

So I'm trying to m make this mod, and about halfway I'm implementing armour, It all goes well,

until I try to put my armour on. When I equip the armour, it's not shown on my character,

and my Eclipse Console gets spammed with the following error:

 

http://pastebin.com/wnR7Pqdt

 

I put the images (armour_1.png & armour_2.png) in:

jars > bin > minecraft.jar > armor

 

My Code:

http://pastebin.com/Vg9LrSxk

 

Item_IngotShinyGold.java:

http://pastebin.com/WAT1Gk0j

Posted

I don't know where you got minecraft inside of eclipse...?

 

Anyway, I exported the mod, and put it in my MC jar. I put the

textures in "items" and the armour textures in "armor". I still

didn't get the right texture, so I'm guessing I goof'd up with the

name of the NameOfArmour_1 and _2 png files?

 

It's suppost to be the same as in the EnumArmorMaterial.java right?

Posted

Replace this line:

 

public static final Item Helmet_ShinyGold = (new ItemArmor(2006, EnumArmorMaterial.SHINYGOLD ,5,0 ).setItemName("Shiny Gold Helmet"));\

 

With:

 

public static final Item Helmet_ShinyGold = (new ItemArmor(2006, EnumArmorMaterial.SHINYGOLD ,RenderingRegistry.addNewArmourRendererPrefix("AN_ARMOR_NAME"),0

).setItemName("Shiny Gold Helmet"));

 

 

And also in your item class add:

 

    public String getArmorTextureFile(ItemStack par1)

    {

        return "FILE_TO_ARMOR_RENDERING";

    }

    public String getTextureFile()

    {

        return "FILE_TO_ITEM_TEXTURE";

    }

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.