My armor models/textures from the mod I'm making (Clothes.png and Clothes2.png) aren't displaying and instead i get a normal iron armor model. Why is this? This is my code:
package com.example.AoT;
import javax.swing.text.html.parser.Entity;
import scala.tools.nsc.MainClass;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
public class ArmorTC extends ItemArmor{
public ArmorTC(int i, ArmorMaterial armorTC, int id, int placement) {
super(armorTC, id, placement);
setCreativeTab(CreativeTabs.tabCombat);
if (placement == 1){
this.setTextureName(AoT.MODID + ":TrainingCorpsJacket");
}
else if (placement == 2){
this.setTextureName(AoT.MODID + ":TrainingCorpsTrousers");
}
else if (placement == 3){
this.setTextureName(AoT.MODID + ":TrainingCorpsBoots");
}
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
if (stack.getItem() == AoT.TrainingCorpsJacket || stack.getItem() == AoT.TrainingCorpsBoots) {
return AoT.MODID + ":textures/models/armor/Clothes.png";
}
if (stack.getItem() == AoT.TrainingCorpsTrousers) {
return AoT.MODID + ":textures/models/armor/Clothes2.png";
} else {
return null;
}
}
}
UPDATED PART OF CODE (I'm getting an error at .itemID in the debugger, should i type something else there or what?)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
if (stack.getItem().itemID == AoT.TrainingCorpsJacket.itemID || stack.getItem().itemID == AoT.TrainingCorpsBoots.itemID) {
return AoT.MODID + ":textures/models/armor/clothes.png";
}
if (stack.getItem().itemID == AoT.TrainingCorpsTrousers.itemID) {
return AoT.MODID + ":textures/models/armor/clothes2.png";
} else {
return null;