Package net.minecraft.client.gui.screen
Record Class ButtonTextures
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screen.ButtonTextures
- Record Components:
enabled- the texture for when the widget is enabled, but not focuseddisabled- the texture for when the widget is disabled, but not focusedenabledFocused- the texture for when the widget is enabled and focuseddisabledFocused- the texture for when the widget is disabled and focused
@Environment(CLIENT)
public record ButtonTextures(Identifier enabled, Identifier disabled, Identifier enabledFocused, Identifier disabledFocused)
extends Record
A set of button textures. It contains four texture choices, one of each of the cases
where a button is enabled/disabled and focused/not focused.
- Mappings:
Namespace Name named net/minecraft/client/gui/screen/ButtonTexturesintermediary net/minecraft/class_8666official fjznamed enabledintermediary comp_1604official anamed disabledintermediary comp_1605official bnamed enabledFocusedintermediary comp_1606official cnamed disabledFocusedintermediary comp_1607official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for thedisabledrecord component.private final IdentifierThe field for thedisabledFocusedrecord component.private final IdentifierThe field for theenabledrecord component.private final IdentifierThe field for theenabledFocusedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionButtonTextures(Identifier unfocused, Identifier focused) Constructs a set of button textures where only focusing the widget affects the textures.ButtonTextures(Identifier enabled, Identifier disabled, Identifier focused) Constructs a set of button textures where both disabled cases use the same texture.ButtonTextures(Identifier identifier, Identifier identifier2, Identifier identifier3, Identifier identifier4) -
Method Summary
Modifier and TypeMethodDescriptiondisabled()Returns the value of thedisabledrecord component.Returns the value of thedisabledFocusedrecord component.enabled()Returns the value of theenabledrecord component.Returns the value of theenabledFocusedrecord component.final booleanIndicates whether some other object is "equal to" this one.get(boolean enabled, boolean focused) Gets a specific texture option from this texture set.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
enabled
The field for theenabledrecord component. -
disabled
The field for thedisabledrecord component. -
enabledFocused
The field for theenabledFocusedrecord component. -
disabledFocused
The field for thedisabledFocusedrecord component.
-
-
Constructor Details
-
ButtonTextures
Constructs a set of button textures where only focusing the widget affects the textures.- Parameters:
unfocused- the texture for when the widget is not focusedfocused- the texture for when the widget is focused- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gui/screen/ButtonTextures;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Vintermediary <init>Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Vofficial <init>Lfjz;<init>(Lakr;Lakr;)V
-
ButtonTextures
Constructs a set of button textures where both disabled cases use the same texture.- Parameters:
enabled- the texture for when the widget is enabled, but not focuseddisabled- the texture for when the widget is disabledfocused- the texture for when the widget is enabled and focused- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gui/screen/ButtonTextures;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Vintermediary <init>Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Vofficial <init>Lfjz;<init>(Lakr;Lakr;Lakr;)V
-
ButtonTextures
public ButtonTextures(Identifier identifier, Identifier identifier2, Identifier identifier3, Identifier identifier4)
-
-
Method Details
-
get
Gets a specific texture option from this texture set.- Parameters:
enabled-trueif the widget is enabled,falseotherwisefocused-trueif the widget is focused,falseotherwise- Returns:
- the texture identifier matching the widget state
- Mappings:
Namespace Name Mixin selector named getLnet/minecraft/client/gui/screen/ButtonTextures;get(ZZ)Lnet/minecraft/util/Identifier;intermediary method_52729Lnet/minecraft/class_8666;method_52729(ZZ)Lnet/minecraft/class_2960;official aLfjz;a(ZZ)Lakr;
-
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 theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
disabled
Returns the value of thedisabledrecord component.- Returns:
- the value of the
disabledrecord component
-
enabledFocused
Returns the value of theenabledFocusedrecord component.- Returns:
- the value of the
enabledFocusedrecord component
-
disabledFocused
Returns the value of thedisabledFocusedrecord component.- Returns:
- the value of the
disabledFocusedrecord component
-