Package net.minecraft.client
Class StringSplitter.WidthLimitedCharSink
java.lang.Object
net.minecraft.client.StringSplitter.WidthLimitedCharSink
- All Implemented Interfaces:
FormattedCharSink
- Enclosing class:
StringSplitter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts a single code point from aFormattedCharSequence.intvoid
-
Field Details
-
maxWidth
private float maxWidth -
position
private int position
-
-
Constructor Details
-
WidthLimitedCharSink
public WidthLimitedCharSink(float maxWidth)
-
-
Method Details
-
accept
Accepts a single code point from aFormattedCharSequence.- Specified by:
acceptin interfaceFormattedCharSink- Parameters:
positionInCurrentSequence- Contains the relative position of the character in the current sub-sequence. If multiple formatted char sequences have been combined, this value will reset to0after each sequence has been fully consumed.- Returns:
trueto accept more characters,falseto stop traversing the sequence.
-
getPosition
public int getPosition() -
resetPosition
public void resetPosition()
-