IArmorMaterial
Link to iarmormaterial
导入类
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 Copyimport crafttweaker.api.item.armor.IArmorMaterial;
使用方式
Link to 使用方式
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 CopyIArmorMaterial.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 CopyIArmorMaterial.getDurability(slotIn as MCEquipmentSlotType) as int
参数 | 类型 | 描述 |
---|---|---|
参数 slotIn | 类型 MCEquipmentSlotType | 描述 The slot to get the value of. |
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();
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();
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();
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 enchantability | 类型 int | 可获得 true | 可设置 false | 描述 Gets the enchantability of this material. |
名称 knockbackResistance | 类型 float | 可获得 true | 可设置 false | 描述 Gets the knockback resistance of this material. |
名称 repairMaterial | 类型 材料(IIngredient) | 可获得 true | 可设置 false | 描述 Gets the repair material of this material. |
名称 toughness | 类型 float | 可获得 true | 可设置 false | 描述 Gets the toughness of this material. |