All Implemented Interfaces:
IArmorUpgradeHandler<JetBootsHandler.JetBootsLocalState>

public class JetBootsHandler extends BaseArmorUpgradeHandler<JetBootsHandler.JetBootsLocalState>
  • Field Details

  • Constructor Details

    • JetBootsHandler

      public JetBootsHandler()
  • Method Details

    • getID

      public net.minecraft.resources.ResourceLocation getID()
      Description copied from interface: IArmorUpgradeHandler
      Get a unique ID for this upgrade handler. You can use this ID to retrieve the handler object with ICommonArmorRegistry.getArmorUpgradeHandler(ResourceLocation).
      Returns:
      a unique resource location
    • getRequiredUpgrades

      public PNCUpgrade[] getRequiredUpgrades()
      Description copied from interface: IArmorUpgradeHandler
      Return the upgrades that are required to be in the armor piece to enable this module.
      Returns:
      an array of required upgrades
    • getIdleAirUsage

      public float getIdleAirUsage(ICommonArmorHandler armorHandler)
      Description copied from interface: IArmorUpgradeHandler
      Returns 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: IArmorUpgradeHandler
      Get the armor slot that this upgrade handler is attached to.
      Returns:
      the armor slot
    • extensionData

      Description copied from interface: IArmorUpgradeHandler
      Set 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 implements IArmorExtensionData. This data will be stored in the common armor handler for the player, and can be retrieved with ICommonArmorHandler.getExtensionData(IArmorUpgradeHandler).
      Returns:
      a supplier for the extension data for this upgrade & player; supply null if there is none
    • tick

      public void tick(ICommonArmorHandler commonArmorHandler, boolean enabled)
      Description copied from interface: IArmorUpgradeHandler
      Called every tick for a player when this upgrade is installed in their armor
      Parameters:
      commonArmorHandler - the armor handler object
      enabled - true if the upgrade is currently enabled, false otherwise
    • onInit

      public void onInit(ICommonArmorHandler commonArmorHandler)
      Description copied from interface: IArmorUpgradeHandler
      Called when the armor is initialising and this upgrade is installed.
      Parameters:
      commonArmorHandler - the armor handler object
    • onToggle

      public void onToggle(ICommonArmorHandler commonArmorHandler, boolean newState)
      Description copied from interface: IArmorUpgradeHandler
      Called when an upgrade is toggled on/off by the player
      Parameters:
      commonArmorHandler - the armor handler object
      newState - the new state of the upgrade
    • onShutdown

      public void onShutdown(ICommonArmorHandler commonArmorHandler)
      Description copied from interface: IArmorUpgradeHandler
      Called when the armor is removed; carry out any necessary shutdown tasks here
      Parameters:
      commonArmorHandler - the armor handler object
    • onDataFieldUpdated

      public void onDataFieldUpdated(ICommonArmorHandler commonArmorHandler, String tagName, net.minecraft.nbt.Tag inbt)
      Description copied from interface: IArmorUpgradeHandler
      Called on both client and server when some NBT data is changed in this upgrade's armor itemstack. Can be used to cache heavily-accessed NBT data for performance reasons.
      Parameters:
      commonArmorHandler - the armor handler object
      tagName - the NBT tag name
      inbt - the NBT data
    • setJetBootsActive

      public void setJetBootsActive(ICommonArmorHandler commonArmorHandler, boolean newActive)
    • getJetBootsSyncedState

      public JetBootsStateTracker.JetBootsState getJetBootsSyncedState(ICommonArmorHandler commonArmorHandler)