Class TextHandler.LineBreakingVisitor

java.lang.Object
net.minecraft.client.font.TextHandler.LineBreakingVisitor
All Implemented Interfaces:
TextVisitFactory.CharacterVisitor
Enclosing class:
TextHandler

@Environment(CLIENT)
class TextHandler.LineBreakingVisitor
extends Object
implements TextVisitFactory.CharacterVisitor
  • Field Details

  • Constructor Details

  • Method Details

    • onChar

      public boolean onChar​(int index, Style style, int codePoint)
      Visits a single character.

      Multiple surrogate characters are converted into one single codePoint when passed into this method.

      Specified by:
      onChar in interface TextVisitFactory.CharacterVisitor
      Parameters:
      index - the current index of the character
      style - the style of the character, containing formatting and font information
      codePoint - the code point of the character
      Returns:
      true to continue visiting other characters, or false to terminate the visit
    • breakLine

      private boolean breakLine​(int finishIndex, Style finishStyle)
    • hasLineBreak

      private boolean hasLineBreak()
    • getEndingIndex

      public int getEndingIndex()
    • getEndingStyle

      public Style getEndingStyle()
    • offset

      public void offset​(int extraOffset)