Record Class ScribeActionWidgetTheme
java.lang.Object
java.lang.Record
johnsmith.enchantingoverhauled.client.gui.widget.scribe.ScribeActionWidgetTheme
public record ScribeActionWidgetTheme(Function<ScribeGridData,net.minecraft.network.chat.Component> textProvider, int actionPayload)
extends Record
A data record defining the visual and interactive properties for the
ScribeActionWidget.
Encapsulates the text provider and action payload for each button state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScribeActionWidgetThemestatic final ScribeActionWidgetThemestatic final ScribeActionWidgetThemestatic final ScribeActionWidgetThemestatic final net.minecraft.resources.Identifierstatic final net.minecraft.resources.Identifierstatic final net.minecraft.resources.Identifierstatic final ScribeActionWidgetTheme -
Constructor Summary
ConstructorsConstructorDescriptionScribeActionWidgetTheme(Function<ScribeGridData, net.minecraft.network.chat.Component> textProvider, int actionPayload) Creates an instance of aScribeActionWidgetThemerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactionPayloadrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Function<ScribeGridData, net.minecraft.network.chat.Component> Returns the value of thetextProviderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TEX_ENABLED
public static final net.minecraft.resources.Identifier TEX_ENABLED -
TEX_HIGHLIGHTED
public static final net.minecraft.resources.Identifier TEX_HIGHLIGHTED -
TEX_DISABLED
public static final net.minecraft.resources.Identifier TEX_DISABLED -
START
-
ABORT
-
WON
-
LOST
-
IDLE
-
-
Constructor Details
-
ScribeActionWidgetTheme
public ScribeActionWidgetTheme(Function<ScribeGridData, net.minecraft.network.chat.Component> textProvider, int actionPayload) Creates an instance of aScribeActionWidgetThemerecord class.- Parameters:
textProvider- the value for thetextProviderrecord componentactionPayload- the value for theactionPayloadrecord component
-
-
Method Details
-
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 '=='. -
textProvider
Returns the value of thetextProviderrecord component.- Returns:
- the value of the
textProviderrecord component
-
actionPayload
public int actionPayload()Returns the value of theactionPayloadrecord component.- Returns:
- the value of the
actionPayloadrecord component
-