Record Class TextInputControl

java.lang.Object
java.lang.Record
net.minecraft.dialog.input.TextInputControl
Record Components:
width -
label -
labelVisible -
initial -
maxLength -
multiline -
All Implemented Interfaces:
InputControl

public record TextInputControl(int width, Text label, boolean labelVisible, String initial, int maxLength, Optional<TextInputControl.Multiline> multiline) extends Record implements InputControl
Mappings:
Namespace Name
named net/minecraft/dialog/input/TextInputControl
intermediary net/minecraft/class_11444
official asu
named width
intermediary comp_4351
official c
named label
intermediary comp_4352
official d
named labelVisible
intermediary comp_4353
official e
named initial
intermediary comp_4354
official f
named maxLength
intermediary comp_4383
official g
named multiline
intermediary comp_4384
official h
  • Field Details

    • width

      private final int width
      The field for the width record component.
    • label

      private final Text label
      The field for the label record component.
    • labelVisible

      private final boolean labelVisible
      The field for the labelVisible record component.
    • initial

      private final String initial
      The field for the initial record component.
    • maxLength

      private final int maxLength
      The field for the maxLength record component.
    • multiline

      private final Optional<TextInputControl.Multiline> multiline
      The field for the multiline record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<TextInputControl> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/dialog/input/TextInputControl;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_60650 Lnet/minecraft/class_11444;field_60650:Lcom/mojang/serialization/MapCodec;
      official a Lasu;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<TextInputControl> getCodec()
      Specified by:
      getCodec in interface InputControl
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/dialog/input/InputControl;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_71717 Lnet/minecraft/class_11438;method_71717()Lcom/mojang/serialization/MapCodec;
      official a Lasq;a()Lcom/mojang/serialization/MapCodec;
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • label

      public Text label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • labelVisible

      public boolean labelVisible()
      Returns the value of the labelVisible record component.
      Returns:
      the value of the labelVisible record component
    • initial

      public String initial()
      Returns the value of the initial record component.
      Returns:
      the value of the initial record component
    • maxLength

      public int maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component
    • multiline

      public Optional<TextInputControl.Multiline> multiline()
      Returns the value of the multiline record component.
      Returns:
      the value of the multiline record component