Class MutableText

java.lang.Object
net.minecraft.text.MutableText
All Implemented Interfaces:
com.mojang.brigadier.Message, StringVisitable, Text

public class MutableText extends Object implements Text
The text implementation, with mutation operations.
Mappings:
Namespace Name
named net/minecraft/text/MutableText
intermediary net/minecraft/class_5250
official xd
  • Field Details Link icon

    • content Link icon

      private final TextContent content
      Mappings:
      Namespace Name Mixin selector
      named content Lnet/minecraft/text/MutableText;content:Lnet/minecraft/text/TextContent;
      intermediary field_39005 Lnet/minecraft/class_5250;field_39005:Lnet/minecraft/class_7417;
      official c Lxd;c:Lwq;
    • siblings Link icon

      private final List<Text> siblings
      Mappings:
      Namespace Name Mixin selector
      named siblings Lnet/minecraft/text/MutableText;siblings:Ljava/util/List;
      intermediary field_39006 Lnet/minecraft/class_5250;field_39006:Ljava/util/List;
      official d Lxd;d:Ljava/util/List;
    • style Link icon

      private Style style
      Mappings:
      Namespace Name Mixin selector
      named style Lnet/minecraft/text/MutableText;style:Lnet/minecraft/text/Style;
      intermediary field_39007 Lnet/minecraft/class_5250;field_39007:Lnet/minecraft/class_2583;
      official e Lxd;e:Lxm;
    • ordered Link icon

      private OrderedText ordered
      Mappings:
      Namespace Name Mixin selector
      named ordered Lnet/minecraft/text/MutableText;ordered:Lnet/minecraft/text/OrderedText;
      intermediary field_39008 Lnet/minecraft/class_5250;field_39008:Lnet/minecraft/class_5481;
      official f Lxd;f:Layl;
    • language Link icon

      @Nullable private @Nullable Language language
      Mappings:
      Namespace Name Mixin selector
      named language Lnet/minecraft/text/MutableText;language:Lnet/minecraft/util/Language;
      intermediary field_39009 Lnet/minecraft/class_5250;field_39009:Lnet/minecraft/class_2477;
      official g Lxd;g:Ltl;
  • Constructor Details Link icon

    • MutableText Link icon

      MutableText(TextContent content, List<Text> siblings, Style style)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/text/MutableText;<init>(Lnet/minecraft/text/TextContent;Ljava/util/List;Lnet/minecraft/text/Style;)V
      intermediary <init> Lnet/minecraft/class_5250;<init>(Lnet/minecraft/class_7417;Ljava/util/List;Lnet/minecraft/class_2583;)V
      official <init> Lxd;<init>(Lwq;Ljava/util/List;Lxm;)V
  • Method Details Link icon

    • of Link icon

      public static MutableText of(TextContent content)
      Creates a piece of mutable text with the given content, with no sibling and style.
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/text/MutableText;of(Lnet/minecraft/text/TextContent;)Lnet/minecraft/text/MutableText;
      intermediary method_43477 Lnet/minecraft/class_5250;method_43477(Lnet/minecraft/class_7417;)Lnet/minecraft/class_5250;
      official a Lxd;a(Lwq;)Lxd;
    • getContent Link icon

      public TextContent getContent()
      Returns the content of the text.
      Specified by:
      getContent in interface Text
      Returns:
      the content of the text
      Mappings:
      Namespace Name Mixin selector
      named getContent Lnet/minecraft/text/Text;getContent()Lnet/minecraft/text/TextContent;
      intermediary method_10851 Lnet/minecraft/class_2561;method_10851()Lnet/minecraft/class_7417;
      official b Lwp;b()Lwq;
    • getSiblings Link icon

      public List<Text> getSiblings()
      Returns the siblings of this text.
      Specified by:
      getSiblings in interface Text
      Mappings:
      Namespace Name Mixin selector
      named getSiblings Lnet/minecraft/text/Text;getSiblings()Ljava/util/List;
      intermediary method_10855 Lnet/minecraft/class_2561;method_10855()Ljava/util/List;
      official c Lwp;c()Ljava/util/List;
    • setStyle Link icon

      public MutableText setStyle(Style style)
      Sets the style of this text.
      Mappings:
      Namespace Name Mixin selector
      named setStyle Lnet/minecraft/text/MutableText;setStyle(Lnet/minecraft/text/Style;)Lnet/minecraft/text/MutableText;
      intermediary method_10862 Lnet/minecraft/class_5250;method_10862(Lnet/minecraft/class_2583;)Lnet/minecraft/class_5250;
      official b Lxd;b(Lxm;)Lxd;
    • getStyle Link icon

      public Style getStyle()
      Returns the style of this text.
      Specified by:
      getStyle in interface Text
      Mappings:
      Namespace Name Mixin selector
      named getStyle Lnet/minecraft/text/Text;getStyle()Lnet/minecraft/text/Style;
      intermediary method_10866 Lnet/minecraft/class_2561;method_10866()Lnet/minecraft/class_2583;
      official a Lwp;a()Lxm;
    • append Link icon

      public MutableText append(String text)
      Appends a literal text with content text to this text's siblings.
      Mappings:
      Namespace Name Mixin selector
      named append Lnet/minecraft/text/MutableText;append(Ljava/lang/String;)Lnet/minecraft/text/MutableText;
      intermediary method_27693 Lnet/minecraft/class_5250;method_27693(Ljava/lang/String;)Lnet/minecraft/class_5250;
      official f Lxd;f(Ljava/lang/String;)Lxd;
    • append Link icon

      public MutableText append(Text text)
      Appends a text to this text's siblings.
      Parameters:
      text - the sibling
      Mappings:
      Namespace Name Mixin selector
      named append Lnet/minecraft/text/MutableText;append(Lnet/minecraft/text/Text;)Lnet/minecraft/text/MutableText;
      intermediary method_10852 Lnet/minecraft/class_5250;method_10852(Lnet/minecraft/class_2561;)Lnet/minecraft/class_5250;
      official b Lxd;b(Lwp;)Lxd;
    • styled Link icon

      public MutableText styled(UnaryOperator<Style> styleUpdater)
      Updates the style of this text.
      Parameters:
      styleUpdater - the style updater
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named styled Lnet/minecraft/text/MutableText;styled(Ljava/util/function/UnaryOperator;)Lnet/minecraft/text/MutableText;
      intermediary method_27694 Lnet/minecraft/class_5250;method_27694(Ljava/util/function/UnaryOperator;)Lnet/minecraft/class_5250;
      official a Lxd;a(Ljava/util/function/UnaryOperator;)Lxd;
    • fillStyle Link icon

      public MutableText fillStyle(Style styleOverride)
      Fills the absent parts of this text's style with definitions from styleOverride.
      Parameters:
      styleOverride - the style that provides definitions for absent definitions in this text's style
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named fillStyle Lnet/minecraft/text/MutableText;fillStyle(Lnet/minecraft/text/Style;)Lnet/minecraft/text/MutableText;
      intermediary method_27696 Lnet/minecraft/class_5250;method_27696(Lnet/minecraft/class_2583;)Lnet/minecraft/class_5250;
      official c Lxd;c(Lxm;)Lxd;
    • formatted Link icon

      public MutableText formatted(Formatting[] formattings)
      Adds some formattings to this text's style.
      Parameters:
      formattings - an array of formattings
      Mappings:
      Namespace Name Mixin selector
      named formatted Lnet/minecraft/text/MutableText;formatted([Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/MutableText;
      intermediary method_27695 Lnet/minecraft/class_5250;method_27695([Lnet/minecraft/class_124;)Lnet/minecraft/class_5250;
      official a Lxd;a([Ln;)Lxd;
    • formatted Link icon

      public MutableText formatted(Formatting formatting)
      Add a formatting to this text's style.
      Parameters:
      formatting - a formatting
      Mappings:
      Namespace Name Mixin selector
      named formatted Lnet/minecraft/text/MutableText;formatted(Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/MutableText;
      intermediary method_27692 Lnet/minecraft/class_5250;method_27692(Lnet/minecraft/class_124;)Lnet/minecraft/class_5250;
      official a Lxd;a(Ln;)Lxd;
    • withColor Link icon

      public MutableText withColor(int color)
      Returns the text with the RGB color color.
      Returns:
      the text with the RGB color color
      Mappings:
      Namespace Name Mixin selector
      named withColor Lnet/minecraft/text/MutableText;withColor(I)Lnet/minecraft/text/MutableText;
      intermediary method_54663 Lnet/minecraft/class_5250;method_54663(I)Lnet/minecraft/class_5250;
      official b Lxd;b(I)Lxd;
    • asOrderedText Link icon

      public OrderedText asOrderedText()
      Specified by:
      asOrderedText in interface Text
      Mappings:
      Namespace Name Mixin selector
      named asOrderedText Lnet/minecraft/text/Text;asOrderedText()Lnet/minecraft/text/OrderedText;
      intermediary method_30937 Lnet/minecraft/class_2561;method_30937()Lnet/minecraft/class_5481;
      official g Lwp;g()Layl;
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/text/MutableText;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_5250;equals(Ljava/lang/Object;)Z
      official equals Lxd;equals(Ljava/lang/Object;)Z
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object