ArmorItem
Link to armoritem
Importare la Classe
Link to importare-la-classe
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.type.armor.ArmorItem;
Extending ItemDefinition
Link to extending-itemdefinition
ArmorItem extends ItemDefinition. That means all methods available in ItemDefinition are also available in ArmorItem
Interfacce Implementate
Link to interfacce-implementate
ArmorItem implements the following interfaces. That means all methods defined in these interfaces are also available in ArmorItem
Metodi
Link to metodi
Name: getDefense
Return Type: int
ZenScript Copy// ArmorItem.getDefense() as int
myArmorItem.getDefense();
Name: getEquipSound
Return Type: SoundEvent?
ZenScript Copy// ArmorItem.getEquipSound() as SoundEvent?
myArmorItem.getEquipSound();
Name: getMaterial
Return Type: ArmorMaterial
ZenScript Copy// ArmorItem.getMaterial() as ArmorMaterial
myArmorItem.getMaterial();
Name: getSlot
Return Type: EquipmentSlot
ZenScript Copy// ArmorItem.getSlot() as EquipmentSlot
myArmorItem.getSlot();
Name: getToughness
Return Type: float
ZenScript Copy// ArmorItem.getToughness() as float
myArmorItem.getToughness();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome defense | Tipo int | Ha Getter sì | Ha Setter no |
Nome equipSound | Tipo SoundEvent? | Ha Getter sì | Ha Setter no |
Nome material | Tipo ArmorMaterial | Ha Getter sì | Ha Setter no |
Nome slot | Tipo EquipmentSlot | Ha Getter sì | Ha Setter no |
Nome toughness | Tipo float | Ha Getter sì | Ha Setter no |