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

ArmorMaterials

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.ArmorMaterials;

Implements

ArmorMaterials implements the following interfaces:

StringRepresentable,ArmorMaterial

Undocumented Interfaces

Comparable<Enum>

Enum Constants

ArmorMaterials is an enum with 7 constants. They are accessible like so:

script.zs
// ArmorMaterials.CHAIN
<constant:minecraft:armor/materials:chain>
// ArmorMaterials.DIAMOND
<constant:minecraft:armor/materials:diamond>
// ArmorMaterials.GOLD
<constant:minecraft:armor/materials:gold>
// ArmorMaterials.IRON
<constant:minecraft:armor/materials:iron>
// ArmorMaterials.LEATHER
<constant:minecraft:armor/materials:leather>
// ArmorMaterials.NETHERITE
<constant:minecraft:armor/materials:netherite>
// ArmorMaterials.TURTLE
<constant:minecraft:armor/materials:turtle>

Members

Getter
script.zs
// ArmorMaterials.enchantmentValue as int
<constant:minecraft:armor/materials:chain>.enchantmentValue

Return Type: int

enchantmentValue() as int
script.zs
// ArmorMaterials.enchantmentValue() as int;
<constant:minecraft:armor/materials:chain>.enchantmentValue();

Return Type: int

Getter
script.zs
// ArmorMaterials.equipSound as SoundEvent
<constant:minecraft:armor/materials:chain>.equipSound

Return Type: SoundEvent

equipSound() as SoundEvent
script.zs
// ArmorMaterials.equipSound() as SoundEvent;
<constant:minecraft:armor/materials:chain>.equipSound();

Return Type: SoundEvent

getDefenseForType(type as Type) as int
script.zs
// ArmorMaterials.getDefenseForType(type as Type) as int;
<constant:minecraft:armor/materials:chain>.getDefenseForType(myType);

Parameters:

type Type: Type

Return Type: int

getDurabilityForType(type as Type) as int
script.zs
// ArmorMaterials.getDurabilityForType(type as Type) as int;
<constant:minecraft:armor/materials:chain>.getDurabilityForType(myType);

Parameters:

type Type: Type

Return Type: int

Getter
script.zs
// ArmorMaterials.knockbackResistance as float
<constant:minecraft:armor/materials:chain>.knockbackResistance

Return Type: float

knockbackResistance() as float
script.zs
// ArmorMaterials.knockbackResistance() as float;
<constant:minecraft:armor/materials:chain>.knockbackResistance();

Return Type: float

Getter
script.zs
// ArmorMaterials.name as string
<constant:minecraft:armor/materials:chain>.name

Return Type: string

name() as string
script.zs
// ArmorMaterials.name() as string;
<constant:minecraft:armor/materials:chain>.name();

Return Type: string

Getter
script.zs
// ArmorMaterials.repairIngredient as IIngredient
<constant:minecraft:armor/materials:chain>.repairIngredient

Return Type: IIngredient

repairIngredient() as IIngredient
script.zs
// ArmorMaterials.repairIngredient() as IIngredient;
<constant:minecraft:armor/materials:chain>.repairIngredient();

Return Type: IIngredient

Getter
Gets the serialized name.
script.zs
// ArmorMaterials.serializedName as string
<constant:minecraft:armor/materials:chain>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// ArmorMaterials.serializedName() as string;
<constant:minecraft:armor/materials:chain>.serializedName();

Return Type: string

Getter
script.zs
// ArmorMaterials.toughness as float
<constant:minecraft:armor/materials:chain>.toughness

Return Type: float

toughness() as float
script.zs
// ArmorMaterials.toughness() as float;
<constant:minecraft:armor/materials:chain>.toughness();

Return Type: float