package info.u_team.u_team_core.item.armor;

import net.minecraft.entity.Entity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.*;

public class UArmorItem extends ArmorItem {
	
	protected final String name;
	
	public UArmorItem(String name, Properties properties, IArmorMaterial material, EquipmentSlotType slot) {
		this(name, null, properties, material, slot);
	}
	
	public UArmorItem(String name, ItemGroup group, Properties properties, IArmorMaterial material, EquipmentSlotType slot) {
		super(material, slot, group == null ? properties : properties.group(group));
		this.name = name;
	}
	
	@Override
	public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
		if (!material.getName().equals("invalid")) {
			return null;
		}
		return String.format("%s:textures/models/armor/%s_layer_%d%s.png", getRegistryName().getNamespace(), name, (slot == EquipmentSlotType.LEGS ? 2 : 1), type == null ? "" : String.format("_%s", type));
	}
	
	protected String getTypeString(EquipmentSlotType slot) {
		switch (slot) {
		case HEAD:
			return "helmet";
		case CHEST:
			return "chestplate";
		case LEGS:
			return "leggings";
		case FEET:
			return "boots";
		default:
			return "invalid";
		}
	}
}

@@ -224,17 +224,24 @@
  String 
-n
+textureN
 ame;%0A%09%0A%09
@@ -261,25 +261,32 @@
 Item(String 
-n
+textureN
 ame, Propert
@@ -359,17 +359,24 @@
 %0A%09%09this(
-n
+textureN
 ame, nul
@@ -438,17 +438,24 @@
 (String 
-n
+textureN
 ame, Ite
@@ -632,16 +632,30 @@
 his.
-name = n
+textureName = textureN
 ame;
@@ -943,17 +943,24 @@
 pace(), 
-n
+textureN
 ame, (sl

Change name to texture name