Class StringDecomposer

java.lang.Object
net.minecraft.util.StringDecomposer

public class StringDecomposer extends Object
  • Field Details

  • Constructor Details

    • StringDecomposer

      public StringDecomposer()
  • Method Details

    • feedChar

      private static boolean feedChar(Style pStyle, FormattedCharSink pSink, int pPosition, char pCharacter)
    • iterate

      public static boolean iterate(String pText, Style pStyle, FormattedCharSink pSink)
    • iterateBackwards

      public static boolean iterateBackwards(String pText, Style pStyle, FormattedCharSink pSink)
    • iterateFormatted

      public static boolean iterateFormatted(String pText, Style pStyle, FormattedCharSink pSink)
      Iterate a String while applying legacy formatting codes starting with a § sign.
    • iterateFormatted

      public static boolean iterateFormatted(String pText, int pSkip, Style pStyle, FormattedCharSink pSink)
      Iterate a String while applying legacy formatting codes starting with a § sign.
      Parameters:
      pSkip - The amount of characters to skip from the beginning.
    • iterateFormatted

      public static boolean iterateFormatted(String pText, int pSkip, Style pCurrentStyle, Style pDefaultStyle, FormattedCharSink pSink)
      Iterate a String while applying legacy formatting codes starting with a § sign.
      Parameters:
      pSkip - The amount of character to skip from the beginning.
      pCurrentStyle - The current style at the starting position after the skip.
      pDefaultStyle - The default style for the sequence that should be applied after a reset format code (§r)
    • iterateFormatted

      public static boolean iterateFormatted(FormattedText pText, Style pStyle, FormattedCharSink pSink)
    • filterBrokenSurrogates

      public static String filterBrokenSurrogates(String pText)
    • getPlainText

      public static String getPlainText(FormattedText pText)