Class HackHandler
java.lang.Object
me.desht.pneumaticcraft.api.pneumatic_armor.BaseArmorUpgradeHandler<HackHandler.HackData>
me.desht.pneumaticcraft.common.pneumatic_armor.handlers.HackHandler
- All Implemented Interfaces:
IArmorUpgradeHandler<HackHandler.HackData>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface me.desht.pneumaticcraft.api.pneumatic_armor.IArmorUpgradeHandler
UPGRADE_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet 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.world.entity.EquipmentSlotGet the armor slot that this upgrade handler is attached to.net.minecraft.resources.ResourceLocationgetID()Get a unique ID for this upgrade handler.floatgetIdleAirUsage(ICommonArmorHandler armorHandler) Returns the usage in mL/tick when this upgrade handler is enabled.Return the upgrades that are required to be in the armor piece to enable this module.voidtick(ICommonArmorHandler commonArmorHandler, boolean enabled) Called every tick for a player when this upgrade is installed in their armorMethods inherited from class me.desht.pneumaticcraft.api.pneumatic_armor.BaseArmorUpgradeHandler
getIndex, setIndexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.pneumatic_armor.IArmorUpgradeHandler
getMaxInstallableUpgrades, getMinimumPressure, getTranslationKey, onDataFieldUpdated, onInit, onShutdown, onToggle
-
Constructor Details
-
HackHandler
public HackHandler()
-
-
Method Details
-
getID
public net.minecraft.resources.ResourceLocation getID()Description copied from interface:IArmorUpgradeHandlerGet a unique ID for this upgrade handler. You can use this ID to retrieve the handler object withICommonArmorRegistry.getArmorUpgradeHandler(ResourceLocation).- Returns:
- a unique resource location
-
getRequiredUpgrades
Description copied from interface:IArmorUpgradeHandlerReturn the upgrades that are required to be in the armor piece to enable this module.- Returns:
- an array of required upgrades
-
getIdleAirUsage
Description copied from interface:IArmorUpgradeHandlerReturns the usage in mL/tick when this upgrade handler is enabled. Note this is constant usage just from the upgrade being switched on, and does not take into account air used when some action is taken, e.g. flying with the Jet Boots upgrade is not included here, but air used by the Entity Tracker upgrade is included.- Parameters:
armorHandler- the armor handler object (can be used to get upgrades, etc.)- Returns:
- usage in mL/tick
-
getEquipmentSlot
public net.minecraft.world.entity.EquipmentSlot getEquipmentSlot()Description copied from interface:IArmorUpgradeHandlerGet the armor slot that this upgrade handler is attached to.- Returns:
- the armor slot
-
extensionData
Description copied from interface:IArmorUpgradeHandlerSet 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. If your handler needs this (most don't), override this method to return a supplier of a new instance of some class that implementsIArmorExtensionData. This data will be stored in the common armor handler for the player, and can be retrieved withICommonArmorHandler.getExtensionData(IArmorUpgradeHandler).- Returns:
- a supplier for the extension data for this upgrade & player; supply null if there is none
-
tick
Description copied from interface:IArmorUpgradeHandlerCalled every tick for a player when this upgrade is installed in their armor- Parameters:
commonArmorHandler- the armor handler objectenabled- true if the upgrade is currently enabled, false otherwise
-