Posted October 16, 201411 yr I have a lot of armor to add to my mod and trying to have one class handle it all but all of the armor I add all have the the same texture. Any help would be appreciated. Thanks.. public static void initArmor() { armorAluminiumHelmet = new ooArmor (ooMaterials.armorAluminium, "aluminium", "helmetAluminium", 0, 0); armorAluminiumChestplate= new ooArmor (ooMaterials.armorAluminium, "aluminium", "chestplateAluminium", 0, 1); armorAluminiumLeggings = new ooArmor (ooMaterials.armorAluminium, "aluminium", "leggingsAluminium", 0, 2); armorAluminiumBoots = new ooArmor (ooMaterials.armorAluminium, "aluminium", "bootsAluminium", 0, 3); armorAntimonyHelmet = new ooArmor (ooMaterials.armorAntimony, "antimony", "helmetAntimony", 0, 0); armorAntimonyChestplate = new ooArmor (ooMaterials.armorAntimony, "antimony", "chestplateAntimony", 0, 1); armorAntimonyLeggings = new ooArmor (ooMaterials.armorAntimony, "antimony", "leggingsAntimony", 0, 2); armorAntimonyBoots = new ooArmor (ooMaterials.armorAntimony, "antimony", "bootsAntimony", 0, 3); armorBerylliumHelmet = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "helmetBeryllium", 0, 0); armorBerylliumChestplate= new ooArmor (ooMaterials.armorBeryllium, "beryllium", "chestplateBeryllium", 0, 1); armorBerylliumLeggings = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "leggingsBeryllium", 0, 2); armorBerylliumBoots = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "bootsBeryllium", 0, 3); public class ooArmor extends ItemArmor { public static String texture; public ooArmor(ArmorMaterial mat, String texture, String name, int index, int type) { super(mat, index, type); this.setUnlocalizedName(name); this.texture = texture; this.setCreativeTab(OreOverhaul.tabOreOverhaul); GameRegistry.registerItem(this, this.getUnlocalizedName().substring(5)); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(OreOverhaul.modid + ":" + this.getUnlocalizedName().substring(5)); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(this.armorType == 2) { return "oreoverhaul:textures/models/armor/" + this.texture + "2.png"; } return "oreoverhaul:textures/models/armor/" + this.texture + "1.png"; } }
October 16, 201411 yr Hi This line means that all your ooArmor instances will have the same texture public static String texture; -TGG
October 16, 201411 yr Author Wow.. I feel really stupid.. Don't know how I missed that one.. lol. Sometimes it just takes a second pair of eyes.. Thanks
October 16, 201411 yr What's this mod called? Have you released it? It looks interesting. Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
October 17, 201411 yr Author Working title so far is OreOverhaul. I'll most likely stick with that unless I think of something better. It is not released yet. Just started on it about a week ago. General idea is to eliminate all the frustration of all the ores from different mods generating and conflicting. It will disable all ore generation from all mods and vanilla and replace the ores with mine. Also adding a lot of new ores based off of real world metals and minerals along with their ingots, nuggets, dusts, armor and tools. Will be fully configurable with overworld, nether & end generation with textures to match.
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.