Package com.wdiscute.starcatcher.guide
Record Class SettingsScreen.Button
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.guide.SettingsScreen.Button
- Enclosing class:
SettingsScreen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.neoforged.neoforge.common.ModConfigSpec.DoubleValueReturns the value of theconfigSpecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatincrease()Returns the value of theincreaserecord component.voidmouseClicked(double mouseX, double mouseY) voidmouseScrolled(double mouseX, double mouseY, double scroll) voidrender(net.minecraft.client.gui.GuiGraphics guiGraphics, int width, int height, net.minecraft.client.gui.Font font) text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Button
public Button(net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec, int x, int y, String text, float increase) Creates an instance of aButtonrecord class.- Parameters:
configSpec- the value for theconfigSpecrecord componentx- the value for thexrecord componenty- the value for theyrecord componenttext- the value for thetextrecord componentincrease- the value for theincreaserecord 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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
configSpec
public net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec()Returns the value of theconfigSpecrecord component.- Returns:
- the value of the
configSpecrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
increase
public float increase()Returns the value of theincreaserecord component.- Returns:
- the value of the
increaserecord component
-