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

  • Constructor Details

  • Method Details

    • visit

      public <T> Optional<T> visit​(StringRenderable.Visitor<T> visitor)
      Supplies this renderable's literal content to the visitor.
      Specified by:
      visit in interface StringRenderable
      Parameters:
      visitor - the visitor
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor
    • visit

      public <T> Optional<T> visit​(StringRenderable.StyledVisitor<T> styledVisitor, Style style)
      Supplies this renderable's literal content and contextual style to the visitor.
      Specified by:
      visit in interface StringRenderable
      Parameters:
      styledVisitor - the visitor
      style - the contextual style
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor