Class ChestplateLauncherClientHandler
java.lang.Object
me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler.AbstractHandler<T>
me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>
me.desht.pneumaticcraft.client.pneumatic_armor.upgrade_handler.ChestplateLauncherClientHandler
- All Implemented Interfaces:
IArmorUpgradeClientHandler<ChestplateLauncherHandler>
public class ChestplateLauncherClientHandler
extends IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler
IArmorUpgradeClientHandler.AbstractHandler<T extends IArmorUpgradeHandler<?>>, IArmorUpgradeClientHandler.SimpleToggleableHandler<T extends IArmorUpgradeHandler<?>> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGuiOptionsPage(IGuiScreen screen) When you have some configurable options for your upgrade handler, return a new instance of anIOptionPage.Optional<net.minecraft.client.KeyMapping>Get the keybind used to trigger this upgrade's action, if any.booleanIs this upgrade toggleable, i.e.voidonTriggered(ICommonArmorHandler armorHandler) Called when the registered triggered keybind (if any) is pressed.voidrender2D(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks, boolean armorPieceHasPressure) Called in the 2D render stage (via Forge'sIGuiOverlaysystem).voidtickClient(ICommonArmorHandler armorHandler, boolean isEnabled) This method is called every client tick, and should be used to update clientside logic for armor upgrades.Methods inherited from class me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler.SimpleToggleableHandler
render3D, resetMethods inherited from class me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler.AbstractHandler
getCommonHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.IArmorUpgradeClientHandler
getAnimatedStat, getDefaultStatLayout, getID, getInitialKeyBinding, getKeybindCategory, getSubKeybindCategory, getSubKeybinds, initConfig, isEnabledByDefault, isEnabledByDefault, onResolutionChanged, saveToConfig, setOverlayColor
-
Field Details
-
MAX_PROGRESS
public static final int MAX_PROGRESS- See Also:
-
-
Constructor Details
-
ChestplateLauncherClientHandler
public ChestplateLauncherClientHandler()
-
-
Method Details
-
getGuiOptionsPage
Description copied from interface:IArmorUpgradeClientHandlerWhen you have some configurable options for your upgrade handler, return a new instance of anIOptionPage. When you do so, it will automatically get picked up by the armor GUI handler, and a button for the upgrade will be displayed in the main armor GUI.- Specified by:
getGuiOptionsPagein interfaceIArmorUpgradeClientHandler<ChestplateLauncherHandler>- Overrides:
getGuiOptionsPagein classIArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>- Parameters:
screen- an instance of the gui Screen object- Returns:
- an options page, or null if the upgrade does not have an options page
-
isToggleable
public boolean isToggleable()Description copied from interface:IArmorUpgradeClientHandlerIs this upgrade toggleable, i.e. can it be switched on & off? Toggleable upgrades will have a checkbox in their GUI page with a possible associated keybinding. Non-toggleable upgrades generally have a bindable hotkey to trigger a one-off action (e.g. hacking, chestplate launcher...). The default return value for this method is true, which is the most common case. Override to return false for non-toggleable upgrades.- Returns:
- true if the upgrade is toggleable, false otherwise
-
getTriggerKeyBinding
Description copied from interface:IArmorUpgradeClientHandlerGet the keybind used to trigger this upgrade's action, if any. This is distinct from the toggle keybind (which switches an upgrade on or off); the trigger keybind triggers an action, e.g. Hacking, Pneumatic Kick...- Returns:
- an optional keybinding name
-
onTriggered
Description copied from interface:IArmorUpgradeClientHandlerCalled when the registered triggered keybind (if any) is pressed.- Parameters:
armorHandler- the client-side common armor handler object for the player
-
tickClient
Description copied from interface:IArmorUpgradeClientHandlerThis method is called every client tick, and should be used to update clientside logic for armor upgrades.- Specified by:
tickClientin interfaceIArmorUpgradeClientHandler<ChestplateLauncherHandler>- Overrides:
tickClientin classIArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>- Parameters:
armorHandler- common armor handler for the player wearing this armor pieceisEnabled- true if the upgrade is currently enabled, false otherwise
-
render2D
public void render2D(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks, boolean armorPieceHasPressure) Description copied from interface:IArmorUpgradeClientHandlerCalled in the 2D render stage (via Forge'sIGuiOverlaysystem).- Specified by:
render2Din interfaceIArmorUpgradeClientHandler<ChestplateLauncherHandler>- Overrides:
render2Din classIArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>- Parameters:
matrixStack- the matrix stackpartialTicks- partial ticks since last world tickarmorPieceHasPressure- true if the armor piece actually has any pressure
-