Record Class SettingsScreen.Button

java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.guide.SettingsScreen.Button
Enclosing class:
SettingsScreen

public static record SettingsScreen.Button(net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec, int x, int y, String text, float increase) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Button(net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec, int x, int y, String text, float increase)
    Creates an instance of a Button record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.neoforged.neoforge.common.ModConfigSpec.DoubleValue
    Returns the value of the configSpec record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the increase record component.
    void
    mouseClicked(double mouseX, double mouseY)
     
    void
    mouseScrolled(double mouseX, double mouseY, double scroll)
     
    void
    render(net.minecraft.client.gui.GuiGraphics guiGraphics, int width, int height, net.minecraft.client.gui.Font font)
     
    Returns the value of the text record component.
    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
  • Constructor Details

    • Button

      public Button(net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec, int x, int y, String text, float increase)
      Creates an instance of a Button record class.
      Parameters:
      configSpec - the value for the configSpec record component
      x - the value for the x record component
      y - the value for the y record component
      text - the value for the text record component
      increase - the value for the increase record component
  • Method Details

    • render

      public void render(net.minecraft.client.gui.GuiGraphics guiGraphics, int width, int height, net.minecraft.client.gui.Font font)
    • mouseClicked

      public void mouseClicked(double mouseX, double mouseY)
    • mouseScrolled

      public void mouseScrolled(double mouseX, double mouseY, double scroll)
    • 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 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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • configSpec

      public net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec()
      Returns the value of the configSpec record component.
      Returns:
      the value of the configSpec record component
    • 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
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • increase

      public float increase()
      Returns the value of the increase record component.
      Returns:
      the value of the increase record component