Record Class WidgetSprites
java.lang.Object
java.lang.Record
net.minecraft.client.gui.components.WidgetSprites
public record WidgetSprites(ResourceLocation enabled, ResourceLocation disabled, ResourceLocation enabledFocused, ResourceLocation disabledFocused)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
The field for thedisabled
record component.private final ResourceLocation
The field for thedisabledFocused
record component.private final ResourceLocation
The field for theenabled
record component.private final ResourceLocation
The field for theenabledFocused
record component. -
Constructor Summary
ConstructorDescriptionWidgetSprites
(ResourceLocation p_295225_, ResourceLocation p_294772_) WidgetSprites
(ResourceLocation p_296152_, ResourceLocation p_296020_, ResourceLocation p_296073_) WidgetSprites
(ResourceLocation enabled, ResourceLocation disabled, ResourceLocation enabledFocused, ResourceLocation disabledFocused) Creates an instance of aWidgetSprites
record class. -
Method Summary
Modifier and TypeMethodDescriptiondisabled()
Returns the value of thedisabled
record component.Returns the value of thedisabledFocused
record component.enabled()
Returns the value of theenabled
record component.Returns the value of theenabledFocused
record component.final boolean
Indicates whether some other object is "equal to" this one.get
(boolean p_296269_, boolean p_295773_) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
enabled
The field for theenabled
record component. -
disabled
The field for thedisabled
record component. -
enabledFocused
The field for theenabledFocused
record component. -
disabledFocused
The field for thedisabledFocused
record component.
-
-
Constructor Details
-
WidgetSprites
-
WidgetSprites
public WidgetSprites(ResourceLocation p_296152_, ResourceLocation p_296020_, ResourceLocation p_296073_) -
WidgetSprites
public WidgetSprites(ResourceLocation enabled, ResourceLocation disabled, ResourceLocation enabledFocused, ResourceLocation disabledFocused) Creates an instance of aWidgetSprites
record class.- Parameters:
enabled
- the value for theenabled
record componentdisabled
- the value for thedisabled
record componentenabledFocused
- the value for theenabledFocused
record componentdisabledFocused
- the value for thedisabledFocused
record component
-
-
Method Details
-
get
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
enabled
Returns the value of theenabled
record component.- Returns:
- the value of the
enabled
record component
-
disabled
Returns the value of thedisabled
record component.- Returns:
- the value of the
disabled
record component
-
enabledFocused
Returns the value of theenabledFocused
record component.- Returns:
- the value of the
enabledFocused
record component
-
disabledFocused
Returns the value of thedisabledFocused
record component.- Returns:
- the value of the
disabledFocused
record component
-