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 official euc
intermediary net/minecraft/class_8666
named net/minecraft/client/gui/screen/ButtonTextures
official a
intermediary comp_1604
named enabled
official b
intermediary comp_1605
named disabled
official c
intermediary comp_1606
named enabledFocused
official d
intermediary comp_1607
named disabledFocused
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Identifier
The field for thedisabled
record component.private final Identifier
The field for thedisabledFocused
record component.private final Identifier
The field for theenabled
record component.private final Identifier
The field for theenabledFocused
record component. -
Constructor Summary
ConstructorDescriptionButtonTextures
(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 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 enabled, boolean focused) Gets a specific texture option from this texture set.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
-
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 official <init>
Leuc;<init>(Laew;Laew;)V
intermediary <init>
Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V
named <init>
Lnet/minecraft/client/gui/screen/ButtonTextures;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)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 official <init>
Leuc;<init>(Laew;Laew;Laew;)V
intermediary <init>
Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V
named <init>
Lnet/minecraft/client/gui/screen/ButtonTextures;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)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
-true
if the widget is enabled,false
otherwisefocused
-true
if the widget is focused,false
otherwise- Returns:
- the texture identifier matching the widget state
- Mappings:
Namespace Name Mixin selector official a
Leuc;a(ZZ)Laew;
intermediary method_52729
Lnet/minecraft/class_8666;method_52729(ZZ)Lnet/minecraft/class_2960;
named get
Lnet/minecraft/client/gui/screen/ButtonTextures;get(ZZ)Lnet/minecraft/util/Identifier;
-
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
-