Package net.minecraft.client.font
Interface TextVisitFactory.CharacterVisitor
- All Known Implementing Classes:
TextHandler.LineBreakingVisitor,TextHandler.WidthLimitingVisitor,TextRenderer.ShadowDrawer
- Enclosing class:
- TextVisitFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @Environment(CLIENT) public static interface TextVisitFactory.CharacterVisitor
A visitor for single characters in a string.
-
Method Details
-
onChar
Visits a single character.Multiple surrogate characters are converted into one single
codePointwhen passed into this method.- Parameters:
index- the current index of the characterstyle- the style of the character, containing formatting and font informationcodePoint- the code point of the character- Returns:
trueto continue visiting other characters, orfalseto terminate the visit
-