Record Class ScreenPos

java.lang.Object
java.lang.Record
net.minecraft.client.gui.ScreenPos
Record Components:
x -
y -

@Environment(CLIENT) public record ScreenPos(int x, int y) extends Record
Represents the position of a ScreenRect.
Mappings:
Namespace Name
official fbi
intermediary net/minecraft/class_8029
named net/minecraft/client/gui/ScreenPos
official a
intermediary comp_1193
named x
official b
intermediary comp_1194
named y
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the x record component.
    private final int
    The field for the y record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScreenPos(int int2, int int3)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    final boolean
    equals(Object object)
    Indicates whether some other object is "equal to" this one.
    int
     
    final int
    Returns a hash code value for this object.
    static ScreenPos
    of(NavigationAxis axis, int sameAxis, int otherAxis)
     
    final String
    Returns a string representation of this record class.
    int
    x()
    Returns the value of the x record component.
    int
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

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

    • x

      private final int x
      The field for the x record component.
    • y

      private final int y
      The field for the y record component.
  • Constructor Details

    • ScreenPos

      public ScreenPos(int int2, int int3)
  • Method Details

    • of

      public static ScreenPos of(NavigationAxis axis, int sameAxis, int otherAxis)
      Mappings:
      Namespace Name Mixin selector
      official a Lfbi;a(Lfbg;II)Lfbi;
      intermediary method_48246 Lnet/minecraft/class_8029;method_48246(Lnet/minecraft/class_8027;II)Lnet/minecraft/class_8029;
      named of Lnet/minecraft/client/gui/ScreenPos;of(Lnet/minecraft/client/gui/navigation/NavigationAxis;II)Lnet/minecraft/client/gui/ScreenPos;
    • add

      public ScreenPos add(NavigationDirection direction)
      Mappings:
      Namespace Name Mixin selector
      official a Lfbi;a(Lfbh;)Lfbi;
      intermediary method_48247 Lnet/minecraft/class_8029;method_48247(Lnet/minecraft/class_8028;)Lnet/minecraft/class_8029;
      named add Lnet/minecraft/client/gui/ScreenPos;add(Lnet/minecraft/client/gui/navigation/NavigationDirection;)Lnet/minecraft/client/gui/ScreenPos;
    • getComponent

      public int getComponent(NavigationAxis axis)
      Mappings:
      Namespace Name Mixin selector
      official a Lfbi;a(Lfbg;)I
      intermediary method_48245 Lnet/minecraft/class_8029;method_48245(Lnet/minecraft/class_8027;)I
      named getComponent Lnet/minecraft/client/gui/ScreenPos;getComponent(Lnet/minecraft/client/gui/navigation/NavigationAxis;)I
    • toString

      public final 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 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 Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

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