Package dev.jaxydog.astral.content.item
Class AstralArmorItem.Material.Builder
java.lang.Object
dev.jaxydog.astral.content.item.AstralArmorItem.Material.Builder
- Enclosing class:
AstralArmorItem.Material
Builds and constructs an instance of a new
AstralArmorItem.Material.- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the material instance.setDurability(int helmet, int chestplate, int leggings, int boots) Sets the durability of the specified armor type.setDurability(net.minecraft.item.ArmorItem.Type type, int durability) Sets the durability of the specified armor type.setEnchantability(int enchantability) Sets the enchantability of the armor set.setEquipSound(net.minecraft.sound.SoundEvent equipSound) Sets the armor set's equip sound.setKnockbackResistance(float knockbackResistance) Sets the armor's knockback resistance.setProtection(int helmet, int chestplate, int leggings, int boots) Sets the protection level of the specified armor type.setProtection(net.minecraft.item.ArmorItem.Type type, int protection) Sets the protection level of the specified armor type.setRepairIngredient(net.minecraft.recipe.Ingredient repairIngredient) Sets the armor's repair ingredient.setToughness(float toughness) Sets the armor's toughness.
-
Constructor Details
-
Builder
Creates a new armor material builder.This is only accessible through
AstralArmorItem.Material.builder(String)or subclasses.- Parameters:
name- The armor's name.- Since:
- 2.0.0
-
-
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
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
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
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
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
Builds the material instance.- Returns:
- A new material.
- Since:
- 2.0.0
-