Record Class ShortcutKey

java.lang.Object
java.lang.Record
dev.miyomiyo.agentbridge.client.ShortcutKey

public record ShortcutKey(java.lang.String id, java.lang.String translationKey, int defaultKey) extends java.lang.Record
One remappable Minecraft key, shared by its modifier combinations. Equal IDs must carry identical metadata. This is a passive declaration; it does not construct or register a native KeyMapping. The key uses a GLFW key code, or -1 for unbound. Translation keys belong to the supplying MOD.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ShortcutKey
    G for conversation/setup; Shift operates the HUD, then opens settings from mouse mode.
    static final ShortcutKey
    Deliberately unbound: permanent HUD layout is distinct from ordinary pointer use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShortcutKey(java.lang.String id, java.lang.String translationKey, int defaultKey)
    Creates an instance of a ShortcutKey record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the defaultKey record component.
    final boolean
    equals(java.lang.Object o)
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    java.lang.String
    id()
    Returns the value of the id record component.
    final java.lang.String
    Returns a string representation of this record class.
    java.lang.String
    Returns the value of the translationKey record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ASSISTANT

      public static final ShortcutKey ASSISTANT
      G for conversation/setup; Shift operates the HUD, then opens settings from mouse mode.
    • LAYOUT

      public static final ShortcutKey LAYOUT
      Deliberately unbound: permanent HUD layout is distinct from ordinary pointer use.
  • Constructor Details

    • ShortcutKey

      public ShortcutKey(java.lang.String id, java.lang.String translationKey, int defaultKey)
      Creates an instance of a ShortcutKey record class.
      Parameters:
      id - the value for the id record component
      translationKey - the value for the translationKey record component
      defaultKey - the value for the defaultKey record component
  • Method Details

    • toString

      public final java.lang.String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class java.lang.Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class java.lang.Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(java.lang.Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class java.lang.Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public java.lang.String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • translationKey

      public java.lang.String translationKey()
      Returns the value of the translationKey record component.
      Returns:
      the value of the translationKey record component
    • defaultKey

      public int defaultKey()
      Returns the value of the defaultKey record component.
      Returns:
      the value of the defaultKey record component