YATS/Forge Documentation
|
Classes | |
class | ArmorProperties |
Public Member Functions | |
ArmorProperties | getProperties (EntityLiving player, ItemStack armor, DamageSource source, double damage, int slot) |
abstract int | getArmorDisplay (EntityPlayer player, ItemStack armor, int slot) |
abstract void | damageArmor (EntityLiving entity, ItemStack stack, DamageSource source, int damage, int slot) |
This interface is to be implemented by ItemArmor classes. It will allow to modify computation of damage and health loss. Computation will be called before the actual armor computation, which can then be cancelled.
|
pure virtual |
Applies damage to the ItemStack. The mod is responsible for reducing the item durability and stack size. If the stack is depleted it will be cleaned up automatically.
entity | The entity wearing the armor |
stack | The ItemStack of the armor item itself. |
source | The source of the damage, which can be used to alter armor properties based on the type or source of damage. |
damage | The amount of damage being applied to the armor |
slot | The armor slot the item is in. |
|
pure virtual |
Get the displayed effective armor.
player | The player wearing the armor. |
armor | The ItemStack of the armor item itself. |
slot | The armor slot the item is in. |
ArmorProperties net.minecraftforge.common.ISpecialArmor.getProperties | ( | EntityLiving | player, |
ItemStack | armor, | ||
DamageSource | source, | ||
double | damage, | ||
int | slot | ||
) |
Retrieves the modifiers to be used when calculating armor damage.
Armor will higher priority will have damage applied to them before lower priority ones. If there are multiple pieces of armor with the same priority, damage will be distributed between them based on there absorption ratio.
player | The entity wearing the armor. |
armor | The ItemStack of the armor item itself. |
source | The source of the damage, which can be used to alter armor properties based on the type or source of damage. |
damage | The total damage being applied to the entity |
slot | The armor slot the item is in. |