Class StringSplitter.WidthLimitedCharSink

java.lang.Object
net.minecraft.client.StringSplitter.WidthLimitedCharSink
All Implemented Interfaces:
FormattedCharSink
Enclosing class:
StringSplitter

class StringSplitter.WidthLimitedCharSink extends Object implements FormattedCharSink
  • Field Details

    • maxWidth

      private float maxWidth
    • position

      private int position
  • Constructor Details

    • WidthLimitedCharSink

      public WidthLimitedCharSink(float pMaxWidth)
  • Method Details

    • accept

      public boolean accept(int pPositionInCurrentSequence, Style pStyle, int pCodePoint)
      Accepts a single code point from a FormattedCharSequence.
      Specified by:
      accept in interface FormattedCharSink
      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 to 0 after each sequence has been fully consumed.
      Returns:
      true to accept more characters, false to stop traversing the sequence.
    • getPosition

      public int getPosition()
    • resetPosition

      public void resetPosition()