Class AstralArmorItem.Material.Builder

java.lang.Object
dev.jaxydog.astral.content.item.AstralArmorItem.Material.Builder
Enclosing class:
AstralArmorItem.Material

public static class AstralArmorItem.Material.Builder extends Object
Builds and constructs an instance of a new AstralArmorItem.Material.
Since:
2.0.0
  • Constructor Details

  • Method Details

    • setDurability

      public AstralArmorItem.Material.Builder setDurability(net.minecraft.item.ArmorItem.Type type, int durability)
      Sets the durability of the specified armor type.
      Parameters:
      type - The armor type.
      durability - The expected durability.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setDurability

      public AstralArmorItem.Material.Builder setDurability(int helmet, int chestplate, int leggings, int boots)
      Sets the durability of the specified armor type.
      Parameters:
      helmet - The helmet's durability.
      chestplate - The chestplate's durability.
      leggings - The leggings' durability.
      boots - The boots' durability.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setProtection

      public AstralArmorItem.Material.Builder setProtection(net.minecraft.item.ArmorItem.Type type, int protection)
      Sets the protection level of the specified armor type.
      Parameters:
      type - The armor type.
      protection - The expected protection level.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setProtection

      public AstralArmorItem.Material.Builder setProtection(int helmet, int chestplate, int leggings, int boots)
      Sets the protection level of the specified armor type.
      Parameters:
      helmet - The helmet's protection level.
      chestplate - The chestplate's protection level.
      leggings - The leggings' protection level.
      boots - The boots' protection level.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setEnchantability

      public AstralArmorItem.Material.Builder setEnchantability(int enchantability)
      Sets the enchantability of the armor set.

      This controls the average enchantments that this armor may receive.

      Parameters:
      enchantability - The armor's enchantability level.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setEquipSound

      public AstralArmorItem.Material.Builder setEquipSound(net.minecraft.sound.SoundEvent equipSound)
      Sets the armor set's equip sound.
      Parameters:
      equipSound - The sound to play when equipping the armor.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setRepairIngredient

      public AstralArmorItem.Material.Builder setRepairIngredient(net.minecraft.recipe.Ingredient repairIngredient)
      Sets the armor's repair ingredient.
      Parameters:
      repairIngredient - The ingredient that may repair an armor item.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setToughness

      public AstralArmorItem.Material.Builder setToughness(float toughness)
      Sets the armor's toughness.

      Toughness effectively removes damage taken when the armor is equipped.

      Parameters:
      toughness - The armor's toughness.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • setKnockbackResistance

      public AstralArmorItem.Material.Builder setKnockbackResistance(float knockbackResistance)
      Sets the armor's knockback resistance.

      Toughness effectively removes knockback taken when the armor is equipped.

      Parameters:
      knockbackResistance - The armor's knockback resistance.
      Returns:
      The builder instance.
      Since:
      2.0.0
    • build

      public AstralArmorItem.Material build()
      Builds the material instance.
      Returns:
      A new material.
      Since:
      2.0.0