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.
import crafttweaker.api.item.type.armor.ArmorMaterial;
Methods
Return Type: int
ArmorMaterial.getDefenseForSlot(slot as EquipmentSlot) as int
Parameter | Type |
---|---|
Parameter slot | Type EquipmentSlot |
Return Type: int
ArmorMaterial.getDurabilityForSlot(slot as EquipmentSlot) as int
Parameter | Type |
---|---|
Parameter slot | Type EquipmentSlot |
Return Type: int
// ArmorMaterial.getEnchantmentValue() as int
myArmorMaterial.getEnchantmentValue();
Return Type: SoundEvent
// ArmorMaterial.getEquipSound() as SoundEvent
myArmorMaterial.getEquipSound();
Return Type: float
// ArmorMaterial.getKnockbackResistance() as float
myArmorMaterial.getKnockbackResistance();
Return Type: string
// ArmorMaterial.getName() as string
myArmorMaterial.getName();
Return Type: IIngredient
// ArmorMaterial.getRepairIngredient() as IIngredient
myArmorMaterial.getRepairIngredient();
Return Type: float
// ArmorMaterial.getToughness() as float
myArmorMaterial.getToughness();
Properties
Name | Type | Has Getter | Has 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 |