Package net.minecraft.text
Record Class LiteralText
java.lang.Object
java.lang.Record
net.minecraft.text.LiteralText
- Record Components:
string-
- All Implemented Interfaces:
class_7417
- Mappings:
Namespace Name official rmintermediary net/minecraft/class_2585named net/minecraft/text/LiteralTextofficial bintermediary comp_737named string
-
Field Summary
FieldsFields inherited from interface net.minecraft.class_7417
field_39004 -
Constructor Summary
ConstructorsConstructorDescriptionLiteralText(String string) Creates an instance of aLiteralTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.string()Returns the value of thestringrecord component.toString()Returns a string representation of this record class.<T> Optional<T>visitSelf(StringVisitable.StyledVisitor<T> styledVisitor, Style style) <T> Optional<T>visitSelf(StringVisitable.Visitor<T> visitor) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.class_7417
parse
-
Field Details
-
string
The field for thestringrecord component.
-
-
Constructor Details
-
LiteralText
Creates an instance of aLiteralTextrecord class.- Parameters:
string- the value for thestringrecord component
-
-
Method Details
-
visitSelf
- Specified by:
visitSelfin interfaceclass_7417- Mappings:
Namespace Name Mixin selector official aLqz;a(Lrb$a;)Ljava/util/Optional;intermediary method_27659Lnet/minecraft/class_7417;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;named visitSelfLnet/minecraft/class_7417;visitSelf(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
-
visitSelf
- Specified by:
visitSelfin interfaceclass_7417- Mappings:
Namespace Name Mixin selector official aLqz;a(Lrb$b;Lre;)Ljava/util/Optional;intermediary method_27660Lnet/minecraft/class_7417;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;named visitSelfLnet/minecraft/class_7417;visitSelf(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;
-
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). -
string
Returns the value of thestringrecord component.- Returns:
- the value of the
stringrecord component
-