Package net.minecraft.text
Interface StringVisitable.StyledVisitor<T>
- Enclosing interface:
- StringVisitable
public static interface StringVisitable.StyledVisitor<T>
A visitor for string content and a contextual
Style
.- Mappings:
Namespace Name official qc$b
intermediary net/minecraft/class_5348$class_5246
named net/minecraft/text/StringVisitable$StyledVisitor
-
Method Summary
-
Method Details
-
accept
Visits a string's content with a contextual style.A contextual style is obtained by calling
Style.withParent(Style)
on the current's text style, passing the previous contextual style or the starting style if it is the beginning of a visit.When a
present optional
is returned, the visit is terminated before visiting all text. Can returnStringVisitable.TERMINATE_VISIT
for convenience.- Parameters:
style
- the current styleasString
- the literal string- Returns:
Optional.empty()
to continue, a non-empty result to terminate- Mappings:
Namespace Name Mixin selector official accept
Lqc$b;accept(Lqj;Ljava/lang/String;)Ljava/util/Optional;
intermediary accept
Lnet/minecraft/class_5348$class_5246;accept(Lnet/minecraft/class_2583;Ljava/lang/String;)Ljava/util/Optional;
named accept
Lnet/minecraft/text/StringVisitable$StyledVisitor;accept(Lnet/minecraft/text/Style;Ljava/lang/String;)Ljava/util/Optional;
-