content: package com.accbdd.complicated_bees.item;
  
  import com.accbdd.complicated_bees.registry.ItemsRegistration;
  import net.minecraft.sounds.SoundEvent;
  import net.minecraft.sounds.SoundEvents;
  import net.minecraft.world.item.ArmorItem;
  import net.minecraft.world.item.ArmorMaterial;
  import net.minecraft.world.item.crafting.Ingredient;
  
  import java.util.function.Supplier;
  
  import static com.accbdd.complicated_bees.ComplicatedBees.MODID;
  
  public enum ArmorMaterials implements ArmorMaterial {
      APIARIST("apiarist", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0, 0, () -> Ingredient.of(ItemsRegistration.WOVEN_MESH.get()));
  
      private final String name;
      private final int durabilityMult;
      private final int[] protectionAmounts;
      private final int enchantmentValue;
      private final SoundEvent equipSound;
      private final float toughness;
      private final float knockbackResistance;
      private final Supplier<Ingredient> repairIngredient;
  
      private static final int[] BASE_DURABILITY = {11, 16, 16, 13};
  
      ArmorMaterials(String name, int durabilityMult, int[] protectionAmounts, int enchantmentValue, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredient) {
          this.name = name;
          this.durabilityMult = durabilityMult;
          this.protectionAmounts = protectionAmounts;
          this.enchantmentValue = enchantmentValue;
          this.equipSound = equipSound;
          this.toughness = toughness;
          this.knockbackResistance = knockbackResistance;
          this.repairIngredient = repairIngredient;
      }
  
      @Override
      public int getDurabilityForType(ArmorItem.Type pType) {
          return BASE_DURABILITY[pType.ordinal()] * this.durabilityMult;
      }
  
      @Override
      public int getDefenseForType(ArmorItem.Type pType) {
          return protectionAmounts[pType.ordinal()];
      }
  
      @Override
      public int getEnchantmentValue() {
          return enchantmentValue;
      }
  
      @Override
      public SoundEvent getEquipSound() {
          return equipSound;
      }
  
      @Override
      public Ingredient getRepairIngredient() {
          return repairIngredient.get();
      }
  
      @Override
      public String getName() {
          return MODID + ":" + name;
      }
  
      @Override
      public float getToughness() {
          return toughness;
      }
  
      @Override
      public float getKnockbackResistance() {
          return knockbackResistance;
      }
  }
  