package info.u_team.u_team_core.item.armor;

import java.util.function.Supplier;

import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.api.distmarker.*;

public class UArmorMaterialVanilla extends UArmorMaterial {
	
	protected final String texture;
	
	public UArmorMaterialVanilla(int durability, int[] armorPoints, int enchantability, SoundEvent soundevent, float toughness, Supplier<Ingredient> ingredient) {
		this(null, durability, armorPoints, enchantability, soundevent, toughness, ingredient);
	}
	
	public UArmorMaterialVanilla(String texture, int durability, int[] armorpoints, int enchantability, SoundEvent soundevent, float toughness, Supplier<Ingredient> ingredient) {
		super(createDurabilityVanillaArray(durability), armorpoints, enchantability, soundevent, toughness, ingredient);
		this.texture = texture;
	}
	
	@OnlyIn(Dist.CLIENT)
	@Override
	public String getName() {
		return texture == null ? super.getName() : texture;
	}
	
	private static final int[] baseDurability = new int[] { 13, 15, 16, 11 };
	
	private static int[] createDurabilityVanillaArray(int durability) {
		final int[] array = new int[4];
		for (int i = 0; i < array.length; i++) {
			array[i] = baseDurability[i] * durability;
		}
		return array;
	}
	
}

@@ -302,16 +302,18 @@
 ture;%0A%09%0A
+//
 %09public 
@@ -464,16 +464,18 @@
 ient) %7B%0A
+//
 %09%09this(n
@@ -556,21 +556,27 @@
 dient);%0A
+//
 %09%7D%0A
-%09%0A
+//%09%0A//
 %09public 
@@ -743,16 +743,623 @@
 ient) %7B%0A
+//%09%09super(createDurabilityVanillaArray(durability), armorpoints, enchantability, soundevent, toughness, ingredient);%0A//%09%09this.texture = texture;%0A//%09%7D%0A%09%0A%09%0A%09%0A%09public UArmorMaterialVanilla(int durability, int%5B%5D armorPoints, int enchantability, Supplier%3CSoundEvent%3E soundevent, float toughness, Supplier%3CIngredient%3E ingredient) %7B%0A%09%09this(null, durability, armorPoints, enchantability, soundevent, toughness, ingredient);%0A%09%7D%0A%09%0A%09public UArmorMaterialVanilla(String texture, int durability, int%5B%5D armorpoints, int enchantability, Supplier%3CSoundEvent%3E soundevent, float toughness, Supplier%3CIngredient%3E ingredient) %7B%0A
 %09%09super(

Use the supplier in the armor material vanilla