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;
//	}
	
	
	
	public UArmorMaterialVanilla(int durability, int[] armorPoints, int enchantability, Supplier<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, Supplier<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,18 +302,29 @@
 ture;%0A%09%0A
-//
+%09@Deprecated%0A
 %09public 
@@ -408,33 +408,33 @@
 SoundEvent sound
-e
+E
 vent, float toug
@@ -475,18 +475,16 @@
 ient) %7B%0A
-//
 %09%09this(n
@@ -526,33 +526,33 @@
 ntability, sound
-e
+E
 vent, toughness,
@@ -569,19 +569,26 @@
 t);%0A
-//
 %09%7D%0A
-//%09%0A//
+%09%0A%09@Deprecated%0A
 %09pub
@@ -696,25 +696,25 @@
 dEvent sound
-e
+E
 vent, float 
@@ -763,47 +763,24 @@
 ) %7B%0A
-//%09%09super(createDurabilityVanillaArray(
+%09%09this(texture, 
 dura
@@ -777,33 +777,32 @@
 ture, durability
-)
 , armorpoints, e
@@ -819,15 +819,21 @@
 ity,
+ () -%3E
  sound
-e
+E
 vent
@@ -862,44 +862,10 @@
 t);%0A
-//%09%09this.texture = texture;%0A//%09%7D%0A%09%0A
 %09
+%7D
 %0A%09%0A%09

Add the old ctors back