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

ArmorMaterial

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

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

Members

Getter
script.zs
// ArmorMaterial.enchantmentValue as int
myArmorMaterial.enchantmentValue

Return Type: int

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

Return Type: int

Getter
script.zs
// ArmorMaterial.equipSound as SoundEvent
myArmorMaterial.equipSound

Return Type: SoundEvent

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

Return Type: SoundEvent

getDefenseForType(type as Type) as int
script.zs
// ArmorMaterial.getDefenseForType(type as Type) as int;
myArmorMaterial.getDefenseForType(myType);

Parameters:

type Type: Type

Return Type: int

getDurabilityForType(type as Type) as int
script.zs
// ArmorMaterial.getDurabilityForType(type as Type) as int;
myArmorMaterial.getDurabilityForType(myType);

Parameters:

type Type: Type

Return Type: int

Getter
script.zs
// ArmorMaterial.knockbackResistance as float
myArmorMaterial.knockbackResistance

Return Type: float

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

Return Type: float

Getter
script.zs
// ArmorMaterial.name as string
myArmorMaterial.name

Return Type: string

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

Return Type: string

Getter
script.zs
// ArmorMaterial.repairIngredient as IIngredient
myArmorMaterial.repairIngredient

Return Type: IIngredient

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

Return Type: IIngredient

Getter
script.zs
// ArmorMaterial.toughness as float
myArmorMaterial.toughness

Return Type: float

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

Return Type: float