Package net.minecraft.dialog.input
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/TextInputControlintermediary net/minecraft/class_11444official atanamed widthintermediary comp_4351official cnamed labelintermediary comp_4352official dnamed labelVisibleintermediary comp_4353official enamed initialintermediary comp_4354official fnamed maxLengthintermediary comp_4383official gnamed multilineintermediary comp_4384official h
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TextInputControl> private final StringThe field for theinitialrecord component.private final TextThe field for thelabelrecord component.private final booleanThe field for thelabelVisiblerecord component.private final intThe field for themaxLengthrecord component.private final Optional<TextInputControl.Multiline> The field for themultilinerecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTextInputControl(int int2, Text text, boolean bool, String string, int int3, Optional<TextInputControl.Multiline> optional) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec<TextInputControl> getCodec()final inthashCode()Returns a hash code value for this object.initial()Returns the value of theinitialrecord component.label()Returns the value of thelabelrecord component.booleanReturns the value of thelabelVisiblerecord component.intReturns the value of themaxLengthrecord component.Returns the value of themultilinerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
width
private final int widthThe field for thewidthrecord component. -
label
The field for thelabelrecord component. -
labelVisible
private final boolean labelVisibleThe field for thelabelVisiblerecord component. -
initial
The field for theinitialrecord component. -
maxLength
private final int maxLengthThe field for themaxLengthrecord component. -
multiline
The field for themultilinerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/dialog/input/TextInputControl;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_60650Lnet/minecraft/class_11444;field_60650:Lcom/mojang/serialization/MapCodec;official aLata;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
TextInputControl
public TextInputControl(int int2, Text text, boolean bool, String string, int int3, Optional<TextInputControl.Multiline> optional)
-
-
Method Details
-
getCodec
- Specified by:
getCodecin interfaceInputControl- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/dialog/input/InputControl;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_71717Lnet/minecraft/class_11438;method_71717()Lcom/mojang/serialization/MapCodec;official aLasw;a()Lcom/mojang/serialization/MapCodec;
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
labelVisible
public boolean labelVisible()Returns the value of thelabelVisiblerecord component.- Returns:
- the value of the
labelVisiblerecord component
-
initial
Returns the value of theinitialrecord component.- Returns:
- the value of the
initialrecord component
-
maxLength
public int maxLength()Returns the value of themaxLengthrecord component.- Returns:
- the value of the
maxLengthrecord component
-
multiline
Returns the value of themultilinerecord component.- Returns:
- the value of the
multilinerecord component
-