Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

ArmorMaterial

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import crafttweaker.api.item.type.armor.ArmorMaterial;

Methods

Return Type: int

script.zs
ArmorMaterial.getDefenseForSlot(slot as EquipmentSlot) as int
ParameterType
Parameter
slot
Type
EquipmentSlot

Return Type: int

script.zs
ArmorMaterial.getDurabilityForSlot(slot as EquipmentSlot) as int
ParameterType
Parameter
slot
Type
EquipmentSlot

Return Type: int

script.zs
// ArmorMaterial.getEnchantmentValue() as int
myArmorMaterial.getEnchantmentValue();

Return Type: SoundEvent

script.zs
// ArmorMaterial.getEquipSound() as SoundEvent
myArmorMaterial.getEquipSound();

Return Type: float

script.zs
// ArmorMaterial.getKnockbackResistance() as float
myArmorMaterial.getKnockbackResistance();

Return Type: string

script.zs
// ArmorMaterial.getName() as string
myArmorMaterial.getName();

Return Type: IIngredient

script.zs
// ArmorMaterial.getRepairIngredient() as IIngredient
myArmorMaterial.getRepairIngredient();

Return Type: float

script.zs
// ArmorMaterial.getToughness() as float
myArmorMaterial.getToughness();

Properties

NameTypeHas GetterHas Setter
Name
enchantmentValue
Type
int
Has Getter
true
Has Setter
false
Name
equipSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
knockbackResistance
Type
float
Has Getter
true
Has Setter
false
Name
name
Type
string
Has Getter
true
Has Setter
false
Name
repairIngredient
Type
IIngredient
Has Getter
true
Has Setter
false
Name
toughness
Type
float
Has Getter
true
Has Setter
false