Package net.minecraft.client.font
Class TextHandler.StyledString
java.lang.Object
net.minecraft.client.font.TextHandler.StyledString
- All Implemented Interfaces:
StringRenderable
- Enclosing class:
- TextHandler
@Environment(CLIENT) static class TextHandler.StyledString extends Object implements StringRenderable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringRenderable
StringRenderable.StyledVisitor<T>, StringRenderable.Visitor<T> -
Field Summary
-
Constructor Summary
Constructors Constructor Description StyledString(String literal, Style style) -
Method Summary
Modifier and Type Method Description <T> Optional<T>visit(StringRenderable.StyledVisitor<T> styledVisitor, Style style)Supplies this renderable's literal content and contextual style to the visitor.<T> Optional<T>visit(StringRenderable.Visitor<T> visitor)Supplies this renderable's literal content to the visitor.
-
Field Details
-
Constructor Details
-
Method Details
-
visit
Supplies this renderable's literal content to the visitor.- Specified by:
visitin interfaceStringRenderable- Parameters:
visitor- the visitor- Returns:
Optional.empty()if the visit finished, or a terminating result from thevisitor
-
visit
Supplies this renderable's literal content and contextual style to the visitor.- Specified by:
visitin interfaceStringRenderable- Parameters:
styledVisitor- the visitorstyle- the contextual style- Returns:
Optional.empty()if the visit finished, or a terminating result from thevisitor
-