public class HackHandler extends BaseArmorUpgradeHandler<HackHandler.HackData>
| Modifier and Type | Class and Description |
|---|---|
static class |
HackHandler.HackData |
UPGRADE_PREFIX| Constructor and Description |
|---|
HackHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.util.function.Supplier<HackHandler.HackData> |
extensionData()
Set up player-specific extension data for this armor upgrade; since armor upgrade handlers are singleton objects,
any player-specific data needs to be stored separately.
|
net.minecraft.inventory.EquipmentSlotType |
getEquipmentSlot()
Get the armor slot that this upgrade handler is attached to.
|
net.minecraft.util.ResourceLocation |
getID()
Get a unique ID for this upgrade handler.
|
float |
getIdleAirUsage(ICommonArmorHandler armorHandler)
Returns the usage in mL/tick when this upgrade handler is enabled.
|
EnumUpgrade[] |
getRequiredUpgrades()
Return the upgrades that are required to be in the armor piece to enable this module.
|
void |
tick(ICommonArmorHandler commonArmorHandler,
boolean enabled)
Called every tick for a player when this upgrade is installed in their armor
|
getIndex, setIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMaxInstallableUpgrades, getMinimumPressure, getStringKey, getTranslationKey, onDataFieldUpdated, onInit, onShutdown, onTogglepublic net.minecraft.util.ResourceLocation getID()
IArmorUpgradeHandlerpublic EnumUpgrade[] getRequiredUpgrades()
IArmorUpgradeHandlerpublic float getIdleAirUsage(ICommonArmorHandler armorHandler)
IArmorUpgradeHandlerarmorHandler - the armor handler object (can be used to get upgrades, etc.)public net.minecraft.inventory.EquipmentSlotType getEquipmentSlot()
IArmorUpgradeHandlerpublic java.util.function.Supplier<HackHandler.HackData> extensionData()
IArmorUpgradeHandlerIArmorExtensionData. This data will be stored
in the common armor handler for the player, and can be retrieved with
ICommonArmorHandler.getExtensionData(IArmorUpgradeHandler).public void tick(ICommonArmorHandler commonArmorHandler, boolean enabled)
IArmorUpgradeHandlercommonArmorHandler - the armor handler objectenabled - true if the upgrade is currently enabled, false otherwise