Package net.minecraft.client
Class StringSplitter.LineBreakFinder
java.lang.Object
net.minecraft.client.StringSplitter.LineBreakFinder
- All Implemented Interfaces:
FormattedCharSink
- Enclosing class:
StringSplitter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Accepts a single code point from aFormattedCharSequence
.void
addToOffset
(int pOffset) private boolean
finishIteration
(int pLineBreak, Style pLineBreakStyle) int
private boolean
-
Field Details
-
maxWidth
private final float maxWidth -
lineBreak
private int lineBreak -
lineBreakStyle
-
hadNonZeroWidthChar
private boolean hadNonZeroWidthChar -
width
private float width -
lastSpace
private int lastSpace -
lastSpaceStyle
-
nextChar
private int nextChar -
offset
private int offset
-
-
Constructor Details
-
LineBreakFinder
public LineBreakFinder(float pMaxWidth)
-
-
Method Details
-
accept
Accepts a single code point from aFormattedCharSequence
.- Specified by:
accept
in interfaceFormattedCharSink
- Parameters:
pPositionInCurrentSequence
- Contains the relative position of the character in the current sub-sequence. If multiple formatted char sequences have been combined, this value will reset to0
after each sequence has been fully consumed.- Returns:
true
to accept more characters,false
to stop traversing the sequence.
-
finishIteration
-
lineBreakFound
private boolean lineBreakFound() -
getSplitPosition
public int getSplitPosition() -
getSplitStyle
-
addToOffset
public void addToOffset(int pOffset)
-