Posted July 12, 201312 yr Okay this may seem realy noobish but I need help with creating custom armor (put facepalm gif here) Does anybody know whats wrong with this line of code here @Override public String getArmorTexture(ItemStack itemstack) { (<-------------- I removed the add overide and that went away) if(itemstack.itemID == TitaniumMod.TitanHelmet.itemID || itemstack.itemID == TitaniumMod.TitanPlate.itemID || itemstack.itemID == TitaniumMod.TitanBoots.itemID){ return <------------ this method must return a result of type string } this from my main mod class //armor TitanHelmet = new TitanArmor(3457, TitanHelmet, proxy.addArmor(""), 0).setUnlocalizedName(""); TitanPlate = new TitanArmor(3458, TitanPlate, proxy.addArmor(""), 1).setUnlocalizedName(""); TitanLegs = new TitanArmor(3459, TitanLegs, proxy.addArmor(""), 2).setUnlocalizedName(""); TitanBoots = new TitanArmor(3460, TitanBoots, proxy.addArmor(""), 3).setUnlocalizedName(""); http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
July 12, 201312 yr Author public String getArmorTextureFile(ItemStack itemstack) {? http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
July 12, 201312 yr Author EnumArmorMaterial TitanArmor = EnumHelper.addArmorMaterial("TITANIUM", 12, new int[] {2, 5, 4, 2}, 9); TitanBoots = new TitanArmor(2040, TitanArmor, 6, 3).setUnlocalizedName("titaniumboots"); this works for me http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
July 12, 201312 yr Author okay now its just purple and black squares. I put it in my items folder but now it says this 2013-07-12 09:37:21 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:titaniummod 2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2296_titaniumboots.png 2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2293_tianiumhelmet.png 2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2295_titaniumlegs.png 2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2294_titaniumplate.png I was able ot fix the missing texture but it shows up on my body as nothing any idea how to render it? whats the MISSING_ICON_ITEM_2294 from armor class package minecraftmod; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; public class TitanArmor extends ItemArmor{ public TitanArmor (int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); } public void updateIcons(IconRegister iconRegister) { itemIcon = iconRegister.registerIcon("titaniummod:titanboots"); itemIcon = iconRegister.registerIcon("titaniummod:titanhelm"); itemIcon = iconRegister.registerIcon("titaniummod:titanlegs"); itemIcon = iconRegister.registerIcon("titaniummod:titanplate"); }} Main class EnumArmorMaterial TitanArmor = EnumHelper.addArmorMaterial("TITANIUM", 12, new int[] {2, 5, 4, 2}, 9); TitanHelmet = new TitanArmor(2037, TitanArmor, 6, 0).setUnlocalizedName("tianiumhelmet"); TitanPlate = new TitanArmor(2038, TitanArmor, 6, 1).setUnlocalizedName("titaniumplate"); TitanLegs = new TitanArmor(2039, TitanArmor, 6, 2).setUnlocalizedName("titaniumlegs"); TitanBoots = new TitanArmor(2040, TitanArmor, 6, 3).setUnlocalizedName("titaniumboots"); http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
July 12, 201312 yr Author I love you too http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
July 12, 201312 yr Author package minecraftmod; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TitanArmor extends ItemArmor{ public final int armorType; private final EnumArmorMaterial material; //public static final String[] ArmourArray = new String[]{"titanHelmet", "titanLeggings", "titanBoots", "titanlChest"}; //@SideOnly(Side.CLIENT) //private Icon[] iconArray; public TitanArmor(int itemId, EnumArmorMaterial EnumArmorMaterial, int par3, int par4) { super(itemId, EnumArmorMaterial, par3, par4); this.material = getArmorMaterial(); this.armorType = par4; } public EnumArmorMaterial getArmorMaterial() { return this.material; } public void updateIcons(IconRegister iconRegister) { } @Override public void registerIcons(IconRegister IconRegister) { //itemIcon = par1IconRegister.registerIcon("minecraftmod:titanhelmet"); //} //public void registerIcons(IconRegister iconRegister) //{ switch (armorType){ case 0: itemIcon = IconRegister.registerIcon("titaniummod:titanhell"); break; case 1: itemIcon = IconRegister.registerIcon("titaniummod:titanchest"); break; case 2: itemIcon = IconRegister.registerIcon("titaniummod:titaniumlegs"); break; case 3: itemIcon = IconRegister.registerIcon("titaniummod:titaniumboots"); break; } } } Is this better your highness \0/ | | _||_ http://i1279.photobucket.com/albums/y523/textcraft/Jul%202013%20-%203/9fe024ebf03623c0265f2c0ac1dfaa87db905ff7c593e1616aec2474a92516f4db7b79aa8e4023f09fb0ecba4ae771f7606d800aacdf40b3b889e1274c94a41a97a0a04ec748_zps33f9ea75.png[/img]
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.