CLASS net/minecraft/class_2561 net/minecraft/text/Text COMMENT A text. Can be converted to and from JSON format. COMMENT COMMENT

Each text has a tree structure, embodying all its {@link COMMENT #getSiblings() siblings}. To iterate contents in the text and all COMMENT its siblings, call {@code visit} methods. COMMENT COMMENT

This interface does not expose mutation operations. For mutation, COMMENT refer to {@link MutableText}. COMMENT COMMENT @see MutableText METHOD method_10851 asString ()Ljava/lang/String; COMMENT Returns the string representation of this text itself, excluding siblings. METHOD method_10855 getSiblings ()Ljava/util/List; COMMENT Returns the siblings of this text. METHOD method_10858 asTruncatedString (I)Ljava/lang/String; COMMENT Returns the full string representation of this text, truncated beyond COMMENT the supplied {@code length}. ARG 1 length COMMENT the max length allowed for the string representation of the text METHOD method_10866 getStyle ()Lnet/minecraft/class_2583; COMMENT Returns the style of this text. METHOD method_27659 visitSelf (Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional; COMMENT Visits the text itself. COMMENT COMMENT @see #visit(Visitor) COMMENT @return the visitor's return value ARG 1 visitor COMMENT the visitor METHOD method_27660 visitSelf (Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional; COMMENT Visits the text itself. COMMENT COMMENT @see #visit(StyledVisitor, Style) COMMENT @return the visitor's return value ARG 1 visitor COMMENT the visitor ARG 2 style COMMENT the current style METHOD method_27661 shallowCopy ()Lnet/minecraft/class_5250; COMMENT Copies the text itself, the style, and the siblings. COMMENT COMMENT

A shallow copy is made for the siblings. METHOD method_27662 copy ()Lnet/minecraft/class_5250; COMMENT Copies the text itself, excluding the styles or siblings. METHOD method_30163 of (Ljava/lang/String;)Lnet/minecraft/class_2561; COMMENT Creates a literal text with the given string as content. ARG 0 string METHOD method_30937 asOrderedText ()Lnet/minecraft/class_5481; METHOD method_36135 (Ljava/util/List;Lnet/minecraft/class_2583;Ljava/lang/String;)Ljava/util/Optional; ARG 1 styleOverride ARG 2 text METHOD method_36136 getWithStyle (Lnet/minecraft/class_2583;)Ljava/util/List; ARG 1 style CLASS class_2562 Serializer COMMENT A JSON serializer for {@link Text}. FIELD field_11752 JSON_READER_LINE_START Ljava/lang/reflect/Field; FIELD field_11753 JSON_READER_POS Ljava/lang/reflect/Field; FIELD field_11754 GSON Lcom/google/gson/Gson; METHOD deserialize (Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object; ARG 1 json ARG 2 type ARG 3 context METHOD method_10867 toJson (Lnet/minecraft/class_2561;)Ljava/lang/String; ARG 0 text METHOD method_10868 toJsonTree (Lnet/minecraft/class_2561;)Lcom/google/gson/JsonElement; ARG 0 text METHOD method_10872 fromJson (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_5250; ARG 0 json METHOD method_10873 fromLenientJson (Ljava/lang/String;)Lnet/minecraft/class_5250; ARG 0 json METHOD method_10875 addStyle (Lnet/minecraft/class_2583;Lcom/google/gson/JsonObject;Lcom/google/gson/JsonSerializationContext;)V ARG 1 style ARG 2 json ARG 3 context METHOD method_10877 fromJson (Ljava/lang/String;)Lnet/minecraft/class_5250; ARG 0 json METHOD method_10879 fromJson (Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_5250; ARG 0 reader METHOD method_10880 getPosition (Lcom/google/gson/stream/JsonReader;)I ARG 0 reader METHOD serialize (Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement; ARG 1 text ARG 2 type ARG 3 context