McScavenger Posted February 7, 2013 Posted February 7, 2013 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 Quote
endershadow Posted February 7, 2013 Posted February 7, 2013 Put the texture for it in the eclipse folder of mcp Quote
McScavenger Posted February 8, 2013 Author Posted February 8, 2013 I have it in: Eclipse > Items Eclipse > Client > Items Eclipse > Client > Bin > Items Eclipse > Server > Items Eclipse > Server > Bin > Items Jars > Bin > Minecraft.jar > armour Quote
McScavenger Posted February 8, 2013 Author Posted February 8, 2013 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? Quote
McScavenger Posted February 8, 2013 Author Posted February 8, 2013 Say what? I'm new to modding... Quote
McScavenger Posted February 10, 2013 Author Posted February 10, 2013 How do I? You need to add your armor with RenderingRegistry.addNewArmourRendererPrefix. Quote
decebaldecebal Posted February 10, 2013 Posted February 10, 2013 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"; } Quote
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.