Posted June 4, 201411 yr Greetings, I've been trying to get armor textures working, but minecraft gives the following error: [Client thread/WARN]: Failed to load texture: minecraft:textures/models/armor/testArmor_layer_2.png java.io.FileNotFoundException: minecraft:textures/models/armor/testArmor_layer_2.png Now testarmor can be found in MODID:textures/models/armor/ , thus minecraft is searching at the wrong place while I do think I've pointed him to the correct folder... The TestArmor Class: (mistake is most likely here) public class testArmor extends ItemArmor { public testArmor(ArmorMaterial p_i45325_1_, int id, int placement) { super(p_i45325_1_, id, placement); if(placement==0){ //if armor is helmet this.setTextureName(Strings.MODID + ":testHelmet"); } else if(placement==1){ //if armor is chest this.setTextureName(Strings.MODID + ":testChestplate"); } else if(placement==2){ //if armor is leggings this.setTextureName(Strings.MODID + ":testLeggings"); } else if(placement==3){ //if armor is boots this.setTextureName(Strings.MODID + ":testBoots"); } } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if(stack.getItem() == RGAitem.testBoots || stack.getItem() == RGAitem.testPlate || stack.getItem() == RGAitem.testHelmet){ return Strings.MODID + ":textures/models/armor/testArmor_layer_1.png"; }else if(stack.getItem() == RGAitem.testPants){ return Strings.MODID + ":textures/models/armor/testArmor_layer_2.png"; }else{ return null; } } My Item Registry: public class RGAitem { public static void mainRegistry(){ initialiseItem(); registerItem(); } public static Item testPlate; public static Item testBoots; public static Item testHelmet; public static Item testPants; public static void initialiseItem(){ testPlate = new testArmor(ArmorMaterial.DIAMOND,MainRegistry.proxy.addArmor("testArmor"),1).setUnlocalizedName("testPlate").setCreativeTab(CreativeTabs.tabMisc); testBoots = new testArmor(ArmorMaterial.DIAMOND,MainRegistry.proxy.addArmor("testArmor"),3).setUnlocalizedName("testBoots").setCreativeTab(CreativeTabs.tabMisc); testHelmet = new testArmor(ArmorMaterial.DIAMOND,MainRegistry.proxy.addArmor("testArmor"),0).setUnlocalizedName("testHelmet").setCreativeTab(CreativeTabs.tabMisc); testPants = new testArmor(ArmorMaterial.DIAMOND,MainRegistry.proxy.addArmor("testArmor"),2).setUnlocalizedName("testPants").setCreativeTab(CreativeTabs.tabMisc); } public static void registerItem(){ GameRegistry.registerItem(testPlate, testPlate.getUnlocalizedName()); GameRegistry.registerItem(testBoots, testBoots.getUnlocalizedName()); GameRegistry.registerItem(testHelmet, testHelmet.getUnlocalizedName()); GameRegistry.registerItem(testPants, testPants.getUnlocalizedName()); } } What horribly stupid mistake have I made here? Why doesn't Mr. forge search in the correct folder? Thanks in advance, Resk
June 4, 201411 yr Author Before anybody starts saying that I should use Override: Eclipse doesn't want to accept the override: The method getArmorTexture(ItemStack, Entity, int, String) of type testArmor must override or implement a supertype method I know that this is strange as Item HAS the getArmorTexture() function so why does Override not work?
June 5, 201411 yr Because you arnt overriding the right function -.- You have to match the name AND the arguments. You probably imported the wrong class for Entity. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 5, 201411 yr Author "You probably imported the wrong class for Entity." ^ there you have it... Thnx for pointing out my incredibly stupid mistake, Sensei!
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.