Class TextHandler.WidthLimitingVisitor

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

@Environment(CLIENT)
class TextHandler.WidthLimitingVisitor
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
    • getLength

      public int getLength()
    • resetLength

      public void resetLength()