Class StepAssistHandler
java.lang.Object
me.desht.pneumaticcraft.api.pneumatic_armor.BaseArmorUpgradeHandler<IArmorExtensionData>
me.desht.pneumaticcraft.common.pneumatic_armor.handlers.StepAssistHandler
- All Implemented Interfaces:
IArmorUpgradeHandler<IArmorExtensionData>
-
Field Summary
Fields inherited from interface me.desht.pneumaticcraft.api.pneumatic_armor.IArmorUpgradeHandler
UPGRADE_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.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.voidonShutdown(ICommonArmorHandler commonArmorHandler) Called when the armor is removed; carry out any necessary shutdown tasks herevoidonToggle(ICommonArmorHandler commonArmorHandler, boolean newState) Called when an upgrade is toggled on/off by the playervoidtick(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
extensionData, getMaxInstallableUpgrades, getMinimumPressure, getTranslationKey, onDataFieldUpdated, onInit
-
Constructor Details
-
StepAssistHandler
public StepAssistHandler()
-
-
Method Details
-
getID
public net.minecraft.resources.ResourceLocation getID()Description copied from interface:IArmorUpgradeHandlerGet a unique ID for this upgrade handler.- 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
-
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
-
onToggle
Description copied from interface:IArmorUpgradeHandlerCalled when an upgrade is toggled on/off by the player- Parameters:
commonArmorHandler- the armor handler objectnewState- the new state of the upgrade
-
onShutdown
Description copied from interface:IArmorUpgradeHandlerCalled when the armor is removed; carry out any necessary shutdown tasks here- Parameters:
commonArmorHandler- the armor handler object
-