Assuming you already have your armour texture, you should be able to override Item#getArmorTexture to return the path to it (e.g. "yourmod:textures/models/yourarmour.png").
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
The Meaning of Life, the Universe, and Everything.
Join Date:
5/22/2015
Posts:
99
Member Details
If you are trying to do it for your own armor you would do it something like this. MainClass is wherever you would have the armor material and the armor coded.
public yourArmor(ArmorMaterial material, int id, int placement) {
super(material, id, placement);
//In inventory
if (placement == 0) {
this.setTextureName(MainClass.MODID + ":helmetTexture");
}
else if (placement == 1) {
this.setTextureName(MainClass.MODID + ":chestplateTexture");
}
else if (placement == 2) {
this.setTextureName(MainClass.MODID + ":leggingTexture");
}
else if (placement == 3) {
this.setTextureName(MainClass.MODID + ":bootTexture");
}
}
The Meaning of Life, the Universe, and Everything.
Join Date:
5/22/2015
Posts:
99
Member Details
I forgot to say you put the textures for the in Item stuff in your textures Item folder (src/main/resources/assets/yourMod/textures/items) and for the on player textures you would put the textures in src/main/resources/assets/yourMod/textures/models/armor. Also for the in inventory textures, they are Items so they can look how you want them to while on the person there are two different textures you need. One contains the Boots the Helmet and the Chestplate which I have added and called ochest. The other texture has the leggings which I have labeled oleggings.
The Meaning of Life, the Universe, and Everything.
Join Date:
5/22/2015
Posts:
99
Member Details
If you are using eclipse you should just be able to hit ctrl+shift+o but here's the list I have. Granted some of these imports will be invalid as they are for my mod and I don't know if you are adding potion effects to your armor when they are being worn but these are the imports I am using. I would recommend just using ctrl+shift+o because it will automatically import what you need
The Meaning of Life, the Universe, and Everything.
Join Date:
5/22/2015
Posts:
99
Member Details
what do you mean? if you mean how does the game know which armor goes in which slot than you need to go to where you made the armor material. 0 is helmet 1 is chestplate 2 is leggings and 3 are the boots if that's what you mean. Also, I forgot to mention that it extends ItemArmor
How do you texture armor?
Y did u open this spoiler?
You use a program such as GIMP or Photoshop.
Yea I know. That but what do I do with the armor texture to make it be in my mod
Y did u open this spoiler?
You should be more specific in your questions. Are you texturing your own armor, or vanilla armor?
If it's your own armor, you have a lot of work to do; if it's vanilla, just make a resource pack (Google can probably help you there).
Assuming you already have your armour texture, you should be able to override Item#getArmorTexture to return the path to it (e.g. "yourmod:textures/models/yourarmour.png").
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
If you are trying to do it for your own armor you would do it something like this. MainClass is wherever you would have the armor material and the armor coded.
public yourArmor(ArmorMaterial material, int id, int placement) {
super(material, id, placement);
//In inventory
if (placement == 0) {
this.setTextureName(MainClass.MODID + ":helmetTexture");
}
else if (placement == 1) {
this.setTextureName(MainClass.MODID + ":chestplateTexture");
}
else if (placement == 2) {
this.setTextureName(MainClass.MODID + ":leggingTexture");
}
else if (placement == 3) {
this.setTextureName(MainClass.MODID + ":bootTexture");
}
}
//On Person
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
if (stack.getItem() == MainClass.yourHelmet || stack.getItem() == MainClass.yourChestplate || stack.getItem() == MainClass.yourBoots){
return MainClass.MODID + ":textures/models/armor/yourBootChestplateHelmet.png";
}
if (stack.getItem() == MainClass.yourLeggings) {
return MainClass.MODID + ":textures/models/armor/yourLeggings.png";
} else{
return null;
}
}
Y did u open this spoiler?
I forgot to say you put the textures for the in Item stuff in your textures Item folder (src/main/resources/assets/yourMod/textures/items) and for the on player textures you would put the textures in src/main/resources/assets/yourMod/textures/models/armor. Also for the in inventory textures, they are Items so they can look how you want them to while on the person there are two different textures you need. One contains the Boots the Helmet and the Chestplate which I have added and called ochest. The other texture has the leggings which I have labeled oleggings.
Ok I'll try it
Y did u open this spoiler?
what do I import?
cause somethings need importing
Y did u open this spoiler?
You probably just need to import everything. Just press i think ctrl+shift+O. For mac it's cmd+shift+O
and what imports do I do?
Y did u open this spoiler?
what coding program are you using?
Eclipse
Y did u open this spoiler?
If you are using eclipse you should just be able to hit ctrl+shift+o but here's the list I have. Granted some of these imports will be invalid as they are for my mod and I don't know if you are adding potion effects to your armor when they are being worn but these are the imports I am using. I would recommend just using ctrl+shift+o because it will automatically import what you need
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.world.World;
import com.MainClass;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
what about placement
Y did u open this spoiler?
what do you mean? if you mean how does the game know which armor goes in which slot than you need to go to where you made the armor material. 0 is helmet 1 is chestplate 2 is leggings and 3 are the boots if that's what you mean. Also, I forgot to mention that it extends ItemArmor
placement gives a error
Y did u open this spoiler?
What is the error, just copy paste from the console
It has a red one like when u miss spell something
Y did u open this spoiler?