Enum Class PneumaticHelmetRegistry

java.lang.Object
java.lang.Enum<PneumaticHelmetRegistry>
me.desht.pneumaticcraft.client.render.pneumatic_armor.PneumaticHelmetRegistry
All Implemented Interfaces:
Serializable, Comparable<PneumaticHelmetRegistry>, Constable, IPneumaticHelmetRegistry

public enum PneumaticHelmetRegistry extends Enum<PneumaticHelmetRegistry> implements IPneumaticHelmetRegistry
  • Enum Constant Details

  • Method Details

    • values

      public static PneumaticHelmetRegistry[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PneumaticHelmetRegistry valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getInstance

      public static PneumaticHelmetRegistry getInstance()
    • registerEntityTrackEntry

      public void registerEntityTrackEntry(Supplier<? extends IEntityTrackEntry> entry)
      Description copied from interface: IPneumaticHelmetRegistry
      Register an entity tracker for the Pneumatic Helmet. Call this from FMLCommonSetupEvent listener (do not use ParallelDispatchEvent.enqueueWork(Runnable)).
      Specified by:
      registerEntityTrackEntry in interface IPneumaticHelmetRegistry
      Parameters:
      entry - the entity tracker
    • registerBlockTrackEntry

      public void registerBlockTrackEntry(net.minecraft.resources.ResourceLocation id, Supplier<? extends IBlockTrackEntry> entry)
      Description copied from interface: IPneumaticHelmetRegistry
      Register an block track entry (i.e. a subcategory of the Block Tracker) for the Pneumatic Helmet. Call this from a FMLClientSetupEvent listener (do not use ParallelDispatchEvent.enqueueWork(Runnable)).
      Specified by:
      registerBlockTrackEntry in interface IPneumaticHelmetRegistry
      Parameters:
      id - the block entry ID
      entry - the block track entry (IBlockTrackEntry.getEntryID() must return the same ID as the id parameter
    • addHUDMessage

      public void addHUDMessage(net.minecraft.network.chat.Component title, List<net.minecraft.network.chat.Component> message, int duration, int backColor)
      Description copied from interface: IPneumaticHelmetRegistry
      Add a message for display in the Pneumatic Helmet HUD display
      Specified by:
      addHUDMessage in interface IPneumaticHelmetRegistry
      Parameters:
      title - the message title
      message - the message text (can be empty if the title suffices for a one-line message)
      duration - the duration in ticks for the message to be displayed
      backColor - the message background color, including alpha (DEFAULT_MESSAGE_BGCOLOR is the default green color used by most messages)
    • addHackable

      public void addHackable(Class<? extends net.minecraft.world.entity.Entity> entityClazz, Supplier<? extends IHackableEntity> iHackable)
      Description copied from interface: IPneumaticHelmetRegistry
      Register a "foreign" entity with your hackable. This should be used for entities you didn't create, i.e. vanilla or from a different mod. For your own entities, just have your entity implement IHackableEntity
      Specified by:
      addHackable in interface IPneumaticHelmetRegistry
      Parameters:
      entityClazz - entity class; subclasses of this entity will also be affected
      iHackable - the hack to register
    • addHackable

      public void addHackable(net.minecraft.world.level.block.Block block, Supplier<? extends IHackableBlock> iHackable)
      Description copied from interface: IPneumaticHelmetRegistry
      Register a "foreign" block with your hackable. This should be used for blocks you didn't create, i.e. vanilla or from a different mod. For your own blocks, just have your block implement IHackableBlock
      Specified by:
      addHackable in interface IPneumaticHelmetRegistry
      Parameters:
      block - the block class; subclasses of this block will also be affected
      iHackable - the hack to register
    • addHackable

      public void addHackable(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> blockTag, Supplier<? extends IHackableBlock> iHackable)
      Description copied from interface: IPneumaticHelmetRegistry
      Register a block tag with your hackable. By default, the vanilla doors, buttons & trapdoors block tags are registered, meaning any block added to any of those tags (e.g. modded doors) will also be considered hackable.
      Specified by:
      addHackable in interface IPneumaticHelmetRegistry
      Parameters:
      blockTag - the block tag to register
      iHackable - the hack to register
    • getCurrentEntityHacks

      public List<IHackableEntity> getCurrentEntityHacks(net.minecraft.world.entity.Entity entity)
      Description copied from interface: IPneumaticHelmetRegistry
      Get a list of all current successful hacks on a given entity. This is used for example in Enderman hacking, so the user can only hack an enderman once (more times wouldn't have any effect). This is mostly used for display purposes.
      Specified by:
      getCurrentEntityHacks in interface IPneumaticHelmetRegistry
      Parameters:
      entity - the entity to check
      Returns:
      empty list if no hacks.
    • registerUpgradeHandler

      public void registerUpgradeHandler(IArmorUpgradeHandler<?> handler)
      Description copied from interface: IPneumaticHelmetRegistry
      Register a common (client and server) handler for a Pneumatic Armor upgrade. This must be called from a FMLCommonSetupEvent handler (it is not necessary to use ParallelDispatchEvent.enqueueWork(Runnable)).
      Specified by:
      registerUpgradeHandler in interface IPneumaticHelmetRegistry
      Parameters:
      handler - the handler to register
    • registerRenderHandler

      public <T extends IArmorUpgradeHandler<?>> void registerRenderHandler(T handler, IArmorUpgradeClientHandler<T> clientHandler)
      Description copied from interface: IPneumaticHelmetRegistry
      Registers the client handler for a Pneumatic Armor upgrade. This must be called from a FMLClientSetupEvent handler; do not use ParallelDispatchEvent.enqueueWork(Runnable). This also registers any keybindings referenced by the render handler (see IArmorUpgradeClientHandler.getInitialKeyBinding() and IArmorUpgradeClientHandler.getSubKeybinds().
      Specified by:
      registerRenderHandler in interface IPneumaticHelmetRegistry
      Parameters:
      handler - the common upgrade handler, previously registered with
      clientHandler - the client handler to register with the common upgrade handler
    • makeKeybindingButton

      public IKeybindingButton makeKeybindingButton(int yPos, net.minecraft.client.KeyMapping keyBinding)
      Description copied from interface: IPneumaticHelmetRegistry
      Create a new keybinding button for an IOptionPage armor GUI screen. This is intended to be called from IOptionPage.populateGui(IGuiScreen) to set up a button which can be used to change a particular key binding.
      Specified by:
      makeKeybindingButton in interface IPneumaticHelmetRegistry
      Parameters:
      yPos - y position of the button
      keyBinding - the keybinding modified by the button
      Returns:
      the new button
    • makeKeybindingCheckBox

      public ICheckboxWidget makeKeybindingCheckBox(net.minecraft.resources.ResourceLocation upgradeId, int xPos, int yPos, int color, Consumer<ICheckboxWidget> onPressed)
      Description copied from interface: IPneumaticHelmetRegistry
      Create or retrieve the toggle checkbox for the given upgrade. If the checkbox doesn't already exist, it will be created; if it exists, the existing checkbox will be returned. There is only ever one toggle checkbox in existence for any given upgrade ID / clientside upgrade handler.

      This is intended to be called from IOptionPage.populateGui(IGuiScreen) when creating the GUI for an upgrade handler.

      Specified by:
      makeKeybindingCheckBox in interface IPneumaticHelmetRegistry
      Parameters:
      upgradeId - the upgrade ID
      xPos - X position of the widget
      yPos - Y position of the widget
      color - widget's text color in ARGB format
      onPressed - called when the checkbox is toggled
    • makeHUDStatPanel

      public IGuiAnimatedStat makeHUDStatPanel(net.minecraft.network.chat.Component title, net.minecraft.world.item.ItemStack icon, IArmorUpgradeClientHandler<?> clientHandler)
      Description copied from interface: IPneumaticHelmetRegistry
      Create a stat panel for display on the Pneumatic Armor HUD.

      This panel is automatically coloured according to the player's armor eyepiece color setting, and is re-positionable by the player. See IArmorUpgradeClientHandler.getDefaultStatLayout() to define the default positioning for the panel.

      Specified by:
      makeHUDStatPanel in interface IPneumaticHelmetRegistry
      Parameters:
      title - title text to display on the stat
      icon - an icon to draw next to the title
      clientHandler - the client upgrade handler this panel is associated with
      Returns:
      the stat panel
    • makeHUDStatPanel

      public IGuiAnimatedStat makeHUDStatPanel(net.minecraft.network.chat.Component title, net.minecraft.resources.ResourceLocation icon, IArmorUpgradeClientHandler<?> clientHandler)
      Description copied from interface: IPneumaticHelmetRegistry
      Just like IPneumaticHelmetRegistry.makeHUDStatPanel(Component, ItemStack, IArmorUpgradeClientHandler) but you can pass an arbitrary texture to use as the icon. The texture should be 16x16.
      Specified by:
      makeHUDStatPanel in interface IPneumaticHelmetRegistry
      Parameters:
      title - title text to display on the stat
      icon - an icon to draw next to the title
      clientHandler - the client upgrade handler this panel is associated with
      Returns:
      the stat panel
    • makeStatMoveButton

      public net.minecraft.client.gui.components.AbstractWidget makeStatMoveButton(int x, int y, IArmorUpgradeClientHandler<?> handler)
      Description copied from interface: IPneumaticHelmetRegistry
      Create a "Move Stat Screen..." button to allow the stat panel for an upgrade to be moved. Clicking this button will automatically open the stat panel configuration GUI and allow the panel to be moved.

      Call this from IOptionPage.populateGui(IGuiScreen), and pass the return value to IGuiScreen.addWidget(AbstractWidget) to add this button to your upgrade GUI.

      Specified by:
      makeStatMoveButton in interface IPneumaticHelmetRegistry
      Parameters:
      x - button X position
      y - button Y position
      handler - the client upgrade handler (can be obtained via IOptionPage.SimpleOptionPage.getClientUpgradeHandler()
      Returns:
      the button
    • getBlockTrackerFocus

      public org.apache.commons.lang3.tuple.Pair<net.minecraft.core.BlockPos,net.minecraft.core.Direction> getBlockTrackerFocus()
      Description copied from interface: IPneumaticHelmetRegistry
      Get the block position and face that is currently focused on by the player via the Block Tracker upgrade. If the Block Tracker isn't currently active or the player isn't currently looking at a block which is of interest to the block tracker, this will return (null,null).
      Specified by:
      getBlockTrackerFocus in interface IPneumaticHelmetRegistry
      Returns:
      a pair of position and facing