public interface ICommonArmorHandler
| Modifier and Type | Method and Description |
|---|---|
float |
addAir(net.minecraft.inventory.EquipmentSlotType slot,
int air)
Add (or remove) air from the armor piece in the given slot.
|
float |
getArmorPressure(net.minecraft.inventory.EquipmentSlotType slot)
Get the pressure for the armor piece in the given equipment slot.
|
<T extends IArmorExtensionData> |
getExtensionData(IArmorUpgradeHandler<T> handler)
Get the per-player extension data for the given upgrade, if any
|
net.minecraft.entity.player.PlayerEntity |
getPlayer()
Get the player wearing this armor
|
int |
getSpeedFromUpgrades(net.minecraft.inventory.EquipmentSlotType slot)
Convenience method to get the speed boost for the given armor piece, which is 1 + {number_of_speed_upgrades}
|
int |
getUpgradeCount(net.minecraft.inventory.EquipmentSlotType slot,
EnumUpgrade upgrade)
Get the number of the given upgrade installed in the given armor slot
|
boolean |
hasMinPressure(net.minecraft.inventory.EquipmentSlotType slot)
Check that the armor in the given is above the minimum pressure limit to operate
|
boolean |
isArmorEnabled()
Check if the armor master switch is enabled (i.e.
|
boolean |
upgradeUsable(IArmorUpgradeHandler<?> handler,
boolean mustBeActive)
CHeck if the given upgrade handler is actually usable right now.
|
net.minecraft.entity.player.PlayerEntity getPlayer()
int getUpgradeCount(net.minecraft.inventory.EquipmentSlotType slot,
EnumUpgrade upgrade)
slot - the equipment slot (must be one of HEAD, CHEST, LEGS or FEET)upgrade - the upgrade to queryint getSpeedFromUpgrades(net.minecraft.inventory.EquipmentSlotType slot)
slot - the equipment slotfloat getArmorPressure(net.minecraft.inventory.EquipmentSlotType slot)
slot - the equipment slotboolean hasMinPressure(net.minecraft.inventory.EquipmentSlotType slot)
slot - the slotfloat addAir(net.minecraft.inventory.EquipmentSlotType slot,
int air)
slot - the slotair - amount to add (negative amounts remove air)boolean isArmorEnabled()
boolean upgradeUsable(IArmorUpgradeHandler<?> handler, boolean mustBeActive)
handler - the upgrade handler to checkmustBeActive - if true, the handler must be currently active<T extends IArmorExtensionData> T getExtensionData(IArmorUpgradeHandler<T> handler)
T - handler typehandler - the armor upgrade handler