Interface IKeybindingButton

All Known Implementing Classes:
KeybindingButton

public interface IKeybindingButton
Represents a button in a options screen which can be used to rebind a key. Don't implement this; use IClientArmorRegistry.makeKeybindingButton(int, KeyMapping) to get an instance of a keybinding button widget.

See also IOptionPage.getKeybindingButton(), which should be overridden to return this button instance if it exists in this screen.

  • Method Summary

    Modifier and Type
    Method
    Description
    default net.minecraft.client.gui.components.AbstractWidget
    Convenience method to get this button as a widget, suitable for passing to IGuiScreen.addWidget(AbstractWidget)
    boolean
    receiveKey(com.mojang.blaze3d.platform.InputConstants.Type type, int keyCode)
     
    void
     
  • Method Details

    • receiveKey

      boolean receiveKey(com.mojang.blaze3d.platform.InputConstants.Type type, int keyCode)
    • receiveKeyReleased

      void receiveKeyReleased()
    • asWidget

      default net.minecraft.client.gui.components.AbstractWidget asWidget()
      Convenience method to get this button as a widget, suitable for passing to IGuiScreen.addWidget(AbstractWidget)
      Returns:
      this keybinding button, as a vanilla widget