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 xi
  • Field Details

    • content

      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 Lxi;c:Lwv;
    • siblings

      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 Lxi;d:Ljava/util/List;
    • style

      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 Lxi;e:Lxr;
    • ordered

      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 Lxi;f:Laxs;
    • language

      @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 Lxi;g:Lts;
  • Constructor Details

    • MutableText

      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> Lxi;<init>(Lwv;Ljava/util/List;Lxr;)V
  • Method Details

    • of

      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 Lxi;a(Lwv;)Lxi;
    • getContent

      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 Lwu;b()Lwv;
    • getSiblings

      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 Lwu;c()Ljava/util/List;
    • setStyle

      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 Lxi;b(Lxr;)Lxi;
    • getStyle

      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 Lwu;a()Lxr;
    • append

      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 Lxi;f(Ljava/lang/String;)Lxi;
    • append

      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 Lxi;b(Lwu;)Lxi;
    • styled

      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 Lxi;a(Ljava/util/function/UnaryOperator;)Lxi;
    • fillStyle

      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 Lxi;c(Lxr;)Lxi;
    • formatted

      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 Lxi;a([Ln;)Lxi;
    • formatted

      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 Lxi;a(Ln;)Lxi;
    • withColor

      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 Lxi;b(I)Lxi;
    • asOrderedText

      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 Lwu;g()Laxs;
    • equals

      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 Lxi;equals(Ljava/lang/Object;)Z
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object