All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class KeyBindsScreen extends OptionsSubScreen
  • Field Details

    • TITLE

      private static final Component TITLE
    • selectedKey

      @Nullable public KeyMapping selectedKey
    • lastKeySelection

      public long lastKeySelection
    • keyBindsList

      private KeyBindsList keyBindsList
    • resetButton

      private Button resetButton
    • lastPressedKey

      private InputConstants.Key lastPressedKey
    • lastPressedModifier

      private InputConstants.Key lastPressedModifier
    • isLastKeyHeldDown

      private boolean isLastKeyHeldDown
    • isLastModifierHeldDown

      private boolean isLastModifierHeldDown
  • Constructor Details

    • KeyBindsScreen

      public KeyBindsScreen(Screen pLastScreen, Options pOptions)
  • Method Details

    • addContents

      protected void addContents()
      Overrides:
      addContents in class OptionsSubScreen
    • addOptions

      protected void addOptions()
      Specified by:
      addOptions in class OptionsSubScreen
    • addFooter

      protected void addFooter()
      Overrides:
      addFooter in class OptionsSubScreen
    • repositionElements

      protected void repositionElements()
      Overrides:
      repositionElements in class OptionsSubScreen
    • mouseClicked

      public boolean mouseClicked(double p_346251_, double p_345041_, int p_345147_)
      Description copied from interface: ContainerEventHandler
      Called when a mouse button is clicked within the GUI element.

      Parameters:
      p_346251_ - the X coordinate of the mouse.
      p_345041_ - the Y coordinate of the mouse.
      p_345147_ - the button that was clicked.
      Returns:
      true if the event is consumed, false otherwise.
    • keyPressed

      public boolean keyPressed(int p_345810_, int p_345447_, int p_344981_)
      Description copied from interface: ContainerEventHandler
      Called when a keyboard key is pressed within the GUI element.

      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
      Parameters:
      p_345810_ - the key code of the pressed key.
      p_345447_ - the scan code of the pressed key.
      p_344981_ - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • keyReleased

      public boolean keyReleased(int p_94715_, int p_94716_, int p_94717_)
      Description copied from interface: ContainerEventHandler
      Called when a keyboard key is released within the GUI element.

      Parameters:
      p_94715_ - the key code of the released key.
      p_94716_ - the scan code of the released key.
      p_94717_ - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • render

      public void render(GuiGraphics p_346209_, int p_344846_, int p_346350_, float p_345601_)
      Description copied from class: Screen
      Neo: mixins targeting this method won't fire for container screens as AbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float) replicates this method in place of a super call to insert an event
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      p_346209_ - the GuiGraphics object used for rendering.
      p_344846_ - the x-coordinate of the mouse cursor.
      p_346350_ - the y-coordinate of the mouse cursor.
      p_345601_ - the partial tick time.