Импорт класса

Link to импорт-класса

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.

ZenScript
Copy
import crafttweaker.api.item.armor.IArmorMaterial;

Link to getDamageReductionAmount

Name: getDamageReductionAmount

Gets the armor value of this material in the given slot. This is how many armor pieces this material fills in the armor bar.

Returns: The armor value of this material in the given slot.
Return Type: int

ZenScript
Copy
IArmorMaterial.getDamageReductionAmount(slotIn as MCEquipmentSlotType) as int
ПараметрТипОписание
Параметр
slotIn
Тип
MCEquipmentSlotType
Описание
The slot to get the value of.

Name: getDurability

Gets the default durability of Armor pieces made from this material in the given slot.

Returns: The default durability of the armor piece.
Return Type: int

ZenScript
Copy
IArmorMaterial.getDurability(slotIn as MCEquipmentSlotType) as int
ПараметрТипОписание
Параметр
slotIn
Тип
MCEquipmentSlotType
Описание
The slot to get the value of.

Link to getEnchantability

Name: getEnchantability

Gets the enchantability of this material.

Returns: The enchantability of this material.
Return Type: int

ZenScript
Copy
// IArmorMaterial.getEnchantability() as int

myIArmorMaterial.getEnchantability();

Link to getKnockbackResistance

Name: getKnockbackResistance

Gets the knockback resistance of this material.

Returns: The knockback resistance of this material.
Return Type: float

ZenScript
Copy
// IArmorMaterial.getKnockbackResistance() as float

myIArmorMaterial.getKnockbackResistance();

Link to getRepairMaterial

Name: getRepairMaterial

Gets the repair material of this material.

Returns: The repair material of this material.
Return Type: IIngredient

ZenScript
Copy
// IArmorMaterial.getRepairMaterial() as IIngredient

myIArmorMaterial.getRepairMaterial();

Name: getToughness

Gets the toughness of this material.

Returns: The toughness of this material.
Return Type: float

ZenScript
Copy
// IArmorMaterial.getToughness() as float

myIArmorMaterial.getToughness();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
enchantability
Тип
int
Имеет Getter
true
Имеет Setter
false
Описание
Gets the enchantability of this material.
Название
knockbackResistance
Тип
float
Имеет Getter
true
Имеет Setter
false
Описание
Gets the knockback resistance of this material.
Название
repairMaterial
Тип
IIngredient
Имеет Getter
true
Имеет Setter
false
Описание
Gets the repair material of this material.
Название
toughness
Тип
float
Имеет Getter
true
Имеет Setter
false
Описание
Gets the toughness of this material.