Class TextHandler.StyledString

java.lang.Object
net.minecraft.client.font.TextHandler.StyledString
All Implemented Interfaces:
StringVisitable
Enclosing class:
TextHandler

@Environment(CLIENT) private static class TextHandler.StyledString extends Object implements StringVisitable
Mappings:
Namespace Name
official erh$c
intermediary net/minecraft/class_5225$class_5345
named net/minecraft/client/font/TextHandler$StyledString
  • Field Details

    • literal

      final String literal
      Mappings:
      Namespace Name Mixin selector
      official c Lerh$c;c:Ljava/lang/String;
      intermediary field_25261 Lnet/minecraft/class_5225$class_5345;field_25261:Ljava/lang/String;
      named literal Lnet/minecraft/client/font/TextHandler$StyledString;literal:Ljava/lang/String;
    • style

      final Style style
      Mappings:
      Namespace Name Mixin selector
      official d Lerh$c;d:Luh;
      intermediary field_25262 Lnet/minecraft/class_5225$class_5345;field_25262:Lnet/minecraft/class_2583;
      named style Lnet/minecraft/client/font/TextHandler$StyledString;style:Lnet/minecraft/text/Style;
  • Constructor Details

    • StyledString

      public StyledString(String literal, Style style)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lerh$c;<init>(Ljava/lang/String;Luh;)V
      intermediary <init> Lnet/minecraft/class_5225$class_5345;<init>(Ljava/lang/String;Lnet/minecraft/class_2583;)V
      named <init> Lnet/minecraft/client/font/TextHandler$StyledString;<init>(Ljava/lang/String;Lnet/minecraft/text/Style;)V
  • Method Details

    • visit

      public <T> Optional<T> visit(StringVisitable.Visitor<T> visitor)
      Supplies this visitable's literal content to the visitor.
      Specified by:
      visit in interface StringVisitable
      Parameters:
      visitor - the visitor
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor
      Mappings:
      Namespace Name Mixin selector
      official a Ltp;a(Ltp$a;)Ljava/util/Optional;
      intermediary method_27657 Lnet/minecraft/class_5348;method_27657(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
      named visit Lnet/minecraft/text/StringVisitable;visit(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
    • visit

      public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)
      Supplies this visitable's literal content and contextual style to the visitor.
      Specified by:
      visit in interface StringVisitable
      Parameters:
      styledVisitor - the visitor
      style - the contextual style
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor
      Mappings:
      Namespace Name Mixin selector
      official a Ltp;a(Ltp$b;Luh;)Ljava/util/Optional;
      intermediary method_27658 Lnet/minecraft/class_5348;method_27658(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;
      named visit Lnet/minecraft/text/StringVisitable;visit(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;