All Implemented Interfaces:
IArmorUpgradeClientHandler<JetBootsHandler>

public class JetBootsClientHandler extends IArmorUpgradeClientHandler.SimpleToggleableHandler<JetBootsHandler>
  • 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_HOVER

      public static final net.minecraft.resources.ResourceLocation MODULE_HOVER
    • MODULE_SMART_HOVER

      public static final net.minecraft.resources.ResourceLocation MODULE_SMART_HOVER
  • Constructor Details

    • JetBootsClientHandler

      public JetBootsClientHandler()
  • Method Details

    • getGuiOptionsPage

      public IOptionPage getGuiOptionsPage(IGuiScreen screen)
      Description copied from interface: IArmorUpgradeClientHandler
      When you have some configurable options for your upgrade handler, return a new instance of an IOptionPage. 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:
      getGuiOptionsPage in interface IArmorUpgradeClientHandler<JetBootsHandler>
      Overrides:
      getGuiOptionsPage in class IArmorUpgradeClientHandler.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
    • isEnabledByDefault

      public boolean isEnabledByDefault(String subModuleName)
      Description copied from interface: IArmorUpgradeClientHandler
      Is the given sub-feature of this upgrade enabled by default? (e.g. the various Block Tracker categories, or the Jet Boots builder mode)
      Parameters:
      subModuleName - name of the submodule name (by convention "{upgrade}.module.{subfeature}")
      Returns:
      whether the sub-feature should be enabled by default
    • tickClient

      public void tickClient(ICommonArmorHandler armorHandler, boolean isEnabled)
      Description copied from interface: IArmorUpgradeClientHandler
      This 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 piece
      isEnabled - 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: IArmorUpgradeClientHandler
      Called in the 2D render stage (via Forge's IGuiOverlay system).
      Specified by:
      render2D in interface IArmorUpgradeClientHandler<JetBootsHandler>
      Overrides:
      render2D in class IArmorUpgradeClientHandler.SimpleToggleableHandler<JetBootsHandler>
      Parameters:
      matrixStack - the matrix stack
      partialTicks - partial ticks since last world tick
      armorPieceHasPressure - true if the armor piece actually has any pressure
    • getAnimatedStat

      public IGuiAnimatedStat getAnimatedStat()
      Description copied from interface: IArmorUpgradeClientHandler
      You can return a IGuiAnimatedStat here, which the HUD Handler will pick up and render. It also automatically opens and closes the stat window as necessary.

      IClientArmorRegistry.makeHUDStatPanel(Component, ItemStack, IArmorUpgradeClientHandler) is a useful method for creating a panel.

      The recommended way to handle this is to have a IGuiAnimatedStat field in your client upgrade handler, and lazy-init that in this method, also resetting the field to null in IArmorUpgradeClientHandler.onResolutionChanged().

      Returns:
      the animated stat, or null if this upgrade doesn't use/require a stat window
    • getDefaultStatLayout

      public StatPanelLayout getDefaultStatLayout()
      Description copied from interface: IArmorUpgradeClientHandler
      Return 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: IArmorUpgradeClientHandler
      Called when the screen resolution has changed. Primarily intended to allow render handlers to recalculate stat positions.
    • getSubKeybinds

      public Collection<net.minecraft.resources.ResourceLocation> getSubKeybinds()
      Description copied from interface: IArmorUpgradeClientHandler
      Get 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 IClientArmorRegistry.makeKeybindingCheckBox(ResourceLocation, int, int, int, Consumer).

      Returns:
      a collection of ID's