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
official tj
intermediary net/minecraft/class_5250
named net/minecraft/text/MutableText
  • Field Details

    • content

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

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

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

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

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

    • MutableText

      MutableText(TextContent content, List<Text> siblings, Style style)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ltj;<init>(Lsx;Ljava/util/List;Lts;)V
      intermediary <init> Lnet/minecraft/class_5250;<init>(Lnet/minecraft/class_7417;Ljava/util/List;Lnet/minecraft/class_2583;)V
      named <init> Lnet/minecraft/text/MutableText;<init>(Lnet/minecraft/text/TextContent;Ljava/util/List;Lnet/minecraft/text/Style;)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
      official a Ltj;a(Lsx;)Ltj;
      intermediary method_43477 Lnet/minecraft/class_5250;method_43477(Lnet/minecraft/class_7417;)Lnet/minecraft/class_5250;
      named of Lnet/minecraft/text/MutableText;of(Lnet/minecraft/text/TextContent;)Lnet/minecraft/text/MutableText;
    • 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
      official b Lsw;b()Lsx;
      intermediary method_10851 Lnet/minecraft/class_2561;method_10851()Lnet/minecraft/class_7417;
      named getContent Lnet/minecraft/text/Text;getContent()Lnet/minecraft/text/TextContent;
    • getSiblings

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

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

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

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

      public MutableText append(Text text)
      Appends a text to this text's siblings.
      Parameters:
      text - the sibling
      Mappings:
      Namespace Name Mixin selector
      official b Ltj;b(Lsw;)Ltj;
      intermediary method_10852 Lnet/minecraft/class_5250;method_10852(Lnet/minecraft/class_2561;)Lnet/minecraft/class_5250;
      named append Lnet/minecraft/text/MutableText;append(Lnet/minecraft/text/Text;)Lnet/minecraft/text/MutableText;
    • 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
      official a Ltj;a(Ljava/util/function/UnaryOperator;)Ltj;
      intermediary method_27694 Lnet/minecraft/class_5250;method_27694(Ljava/util/function/UnaryOperator;)Lnet/minecraft/class_5250;
      named styled Lnet/minecraft/text/MutableText;styled(Ljava/util/function/UnaryOperator;)Lnet/minecraft/text/MutableText;
    • 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
      official c Ltj;c(Lts;)Ltj;
      intermediary method_27696 Lnet/minecraft/class_5250;method_27696(Lnet/minecraft/class_2583;)Lnet/minecraft/class_5250;
      named fillStyle Lnet/minecraft/text/MutableText;fillStyle(Lnet/minecraft/text/Style;)Lnet/minecraft/text/MutableText;
    • 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
      official a Ltj;a([Ln;)Ltj;
      intermediary method_27695 Lnet/minecraft/class_5250;method_27695([Lnet/minecraft/class_124;)Lnet/minecraft/class_5250;
      named formatted Lnet/minecraft/text/MutableText;formatted([Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/MutableText;
    • formatted

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

      public OrderedText asOrderedText()
      Specified by:
      asOrderedText in interface Text
      Mappings:
      Namespace Name Mixin selector
      official f Lsw;f()Laom;
      intermediary method_30937 Lnet/minecraft/class_2561;method_30937()Lnet/minecraft/class_5481;
      named asOrderedText Lnet/minecraft/text/Text;asOrderedText()Lnet/minecraft/text/OrderedText;
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object