Class JetBootsClientHandler
- All Implemented Interfaces:
IArmorUpgradeClientHandler<JetBootsHandler>
-
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
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionYou can return aIGuiAnimatedStathere, which the HUD Handler will pick up and render.Return the default screen layout for this upgrade's stat panel, if it has one.getGuiOptionsPage(IGuiScreen screen) When you have some configurable options for your upgrade handler, return a new instance of anIOptionPage.Collection<net.minecraft.resources.ResourceLocation>Get all the sub-keybinds for this upgrade handler.voidCalled when the screen resolution has changed.voidrender2D(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks, boolean armorPieceHasPressure) Called in the 2D render stage (via the ForgeIIngameOverlaysystem).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, reset, tickClientMethods 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
getID, getInitialKeyBinding, getKeybindCategory, getSubKeybindCategory, getTriggerKeyBinding, initConfig, isToggleable, onTriggered, saveToConfig, setOverlayColor
-
Field Details
-
MODULE_BUILDER_MODE
public static final net.minecraft.resources.ResourceLocation MODULE_BUILDER_MODE -
MODULE_FLIGHT_STABILIZERS
public static final net.minecraft.resources.ResourceLocation MODULE_FLIGHT_STABILIZERS -
MODULE_SMART_HOVER
public static final net.minecraft.resources.ResourceLocation MODULE_SMART_HOVER
-
-
Constructor Details
-
JetBootsClientHandler
public JetBootsClientHandler()
-
-
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<JetBootsHandler>- Overrides:
getGuiOptionsPagein classIArmorUpgradeClientHandler.SimpleToggleableHandler<JetBootsHandler>- Parameters:
screen- an instance of the gui Screen object- Returns:
- an options page, or null if the upgrade does not have an options page
-
tickClient
Description copied from interface:IArmorUpgradeClientHandlerThis method is called every client tick, and should be used to update clientside logic for armor upgrades.- 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 the ForgeIIngameOverlaysystem).- Specified by:
render2Din interfaceIArmorUpgradeClientHandler<JetBootsHandler>- Overrides:
render2Din classIArmorUpgradeClientHandler.SimpleToggleableHandler<JetBootsHandler>- Parameters:
matrixStack- the matrix stackpartialTicks- partial ticks since last world tickarmorPieceHasPressure- true if the armor piece actually has any pressure
-
getAnimatedStat
Description copied from interface:IArmorUpgradeClientHandlerYou can return aIGuiAnimatedStathere, which the HUD Handler will pick up and render. It also automatically opens and closes the stat window as necessary.IPneumaticHelmetRegistry.makeHUDStatPanel(Component, ItemStack, IArmorUpgradeClientHandler)is a useful method for creating a panel.The recommended way to handle this is to have a
IGuiAnimatedStatfield in your client upgrade handler, and lazy-init that in this method, also resetting the field to null inIArmorUpgradeClientHandler.onResolutionChanged().- Returns:
- the animated stat, or null if this upgrade doesn't use/require a stat window
-
getDefaultStatLayout
Description copied from interface:IArmorUpgradeClientHandlerReturn the default screen layout for this upgrade's stat panel, if it has one. Note that the position is easily modifiable by the player using the "Move Screen..." button in the upgrade's GUI.If your handler doesn't have a stat panel (i.e.
IArmorUpgradeClientHandler.getAnimatedStat()returns null), you don't need to override this. If it does have a panel, it's recommended to override this with a reasonable default position.- Returns:
- the default position
-
onResolutionChanged
public void onResolutionChanged()Description copied from interface:IArmorUpgradeClientHandlerCalled when the screen resolution has changed. Primarily intended to allow render handlers to recalculate stat positions. -
getSubKeybinds
Description copied from interface:IArmorUpgradeClientHandlerGet all the sub-keybinds for this upgrade handler. The ID's of any checkboxes which toggle a sub-feature of this upgrade (e.g. the various Block Tracker categories, or the Jet Boots builder mode) need to be returned here so a key binding can be registered for them.The ID's returned here are the same as those passed to
IPneumaticHelmetRegistry.makeKeybindingCheckBox(ResourceLocation, int, int, int, Consumer).- Returns:
- a collection of ID's
-