Interface CharacterVisitor

All Known Implementing Classes:
TextHandler.LineBreakingVisitor, TextHandler.WidthLimitingVisitor, TextRenderer.Drawer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface CharacterVisitor
A visitor for single characters in a string.
Mappings:
Namespace Name
official aft
intermediary net/minecraft/class_5224
named net/minecraft/text/CharacterVisitor
  • Method Summary

    Modifier and Type Method Description
    boolean accept​(int index, Style style, int codePoint)
    Visits a single character.
  • Method Details

    • accept

      @Environment(CLIENT) boolean accept​(int index, Style style, int codePoint)
      Visits a single character.

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

      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
      Mappings:
      Namespace Name Mixin selector
      official accept Laft;accept(ILos;I)Z
      intermediary accept Lnet/minecraft/class_5224;accept(ILnet/minecraft/class_2583;I)Z
      named accept Lnet/minecraft/text/CharacterVisitor;accept(ILnet/minecraft/text/Style;I)Z