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 focused
disabled - the texture for when the widget is disabled, but not focused
enabledFocused - the texture for when the widget is enabled and focused
disabledFocused - 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/ButtonTextures
intermediary net/minecraft/class_8666
official fit
named enabled
intermediary comp_1604
official a
named disabled
intermediary comp_1605
official b
named enabledFocused
intermediary comp_1606
official c
named disabledFocused
intermediary comp_1607
official d
  • Field Details

  • Constructor Details

    • ButtonTextures

      public ButtonTextures(Identifier unfocused, Identifier focused)
      Constructs a set of button textures where only focusing the widget affects the textures.
      Parameters:
      unfocused - the texture for when the widget is not focused
      focused - 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;)V
      intermediary <init> Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V
      official <init> Lfit;<init>(Lalf;Lalf;)V
    • ButtonTextures

      public ButtonTextures(Identifier enabled, Identifier disabled, Identifier focused)
      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 focused
      disabled - the texture for when the widget is disabled
      focused - 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;)V
      intermediary <init> Lnet/minecraft/class_8666;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V
      official <init> Lfit;<init>(Lalf;Lalf;Lalf;)V
    • ButtonTextures

      public ButtonTextures(Identifier identifier, Identifier identifier2, Identifier identifier3, Identifier identifier4)
  • Method Details

    • get

      public Identifier get(boolean enabled, boolean focused)
      Gets a specific texture option from this texture set.
      Parameters:
      enabled - true if the widget is enabled, false otherwise
      focused - true if the widget is focused, false otherwise
      Returns:
      the texture identifier matching the widget state
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/client/gui/screen/ButtonTextures;get(ZZ)Lnet/minecraft/util/Identifier;
      intermediary method_52729 Lnet/minecraft/class_8666;method_52729(ZZ)Lnet/minecraft/class_2960;
      official a Lfit;a(ZZ)Lalf;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • enabled

      public Identifier enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • disabled

      public Identifier disabled()
      Returns the value of the disabled record component.
      Returns:
      the value of the disabled record component
    • enabledFocused

      public Identifier enabledFocused()
      Returns the value of the enabledFocused record component.
      Returns:
      the value of the enabledFocused record component
    • disabledFocused

      public Identifier disabledFocused()
      Returns the value of the disabledFocused record component.
      Returns:
      the value of the disabledFocused record component