Package net.minecraft.client.font
Class TextHandler.StyledString
java.lang.Object
net.minecraft.client.font.TextHandler.StyledString
- All Implemented Interfaces:
StringVisitable
- Enclosing class:
- TextHandler
@Environment(CLIENT) static class TextHandler.StyledString extends Object implements StringVisitable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T> -
Field Summary
Fields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT -
Constructor Summary
Constructors Constructor Description StyledString(String literal, Style style) -
Method Summary
Modifier and Type Method Description <T> Optional<T>visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)Supplies this visitable's literal content and contextual style to the visitor.<T> Optional<T>visit(StringVisitable.Visitor<T> visitor)Supplies this visitable's literal content to the visitor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.text.StringVisitable
getString
-
Field Details
-
literal
-
style
-
-
Constructor Details
-
StyledString
-
-
Method Details
-
visit
Supplies this visitable's literal content to the visitor.- Specified by:
visitin interfaceStringVisitable- Parameters:
visitor- the visitor- Returns:
Optional.empty()if the visit finished, or a terminating result from thevisitor
-
visit
Supplies this visitable's literal content and contextual style to the visitor.- Specified by:
visitin interfaceStringVisitable- Parameters:
styledVisitor- the visitorstyle- the contextual style- Returns:
Optional.empty()if the visit finished, or a terminating result from thevisitor
-