Package net.minecraft.client.font
Class TextHandler
java.lang.Object
net.minecraft.client.font.TextHandler
- Mappings:
Namespace Name named net/minecraft/client/font/TextHandlerintermediary net/minecraft/class_5225official gem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classstatic interfaceA consumer of the line-breaking information.private static classprivate classstatic interfaceA retriever of character width. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEndingIndex(String text, int maxWidth, Style style) intgetTrimmedLength(String text, int maxWidth, Style style) Returns the length of a string when it is trimmed to be at mostmaxWidthwide.floatReturns the width of a string.floatgetWidth(OrderedText text) floatgetWidth(StringVisitable text) Returns the width of a text.static intmoveCursorByWords(String text, int offset, int cursor, boolean consumeSpaceOrBreak) trimToWidth(String text, int maxWidth, Style style) Trim a string to be at mostmaxWidthwide.trimToWidth(StringVisitable text, int width, Style style) trimToWidthBackwards(String text, int maxWidth, Style style) Trim a string from right to left to be at mostmaxWidthwide.voidwrapLines(String text, int maxWidth, Style style, boolean retainTrailingWordSplit, TextHandler.LineWrappingConsumer consumer) wrapLines(StringVisitable text, int maxWidth, Style style) voidwrapLines(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable, Boolean> lineConsumer)
-
Field Details
-
widthRetriever
- Mappings:
Namespace Name Mixin selector named widthRetrieverLnet/minecraft/client/font/TextHandler;widthRetriever:Lnet/minecraft/client/font/TextHandler$WidthRetriever;intermediary field_24216Lnet/minecraft/class_5225;field_24216:Lnet/minecraft/class_5225$class_5231;official aLgem;a:Lgem$f;
-
-
Constructor Details
-
TextHandler
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/font/TextHandler;<init>(Lnet/minecraft/client/font/TextHandler$WidthRetriever;)Vintermediary <init>Lnet/minecraft/class_5225;<init>(Lnet/minecraft/class_5225$class_5231;)Vofficial <init>Lgem;<init>(Lgem$f;)V
-
-
Method Details
-
getWidth
Returns the width of a string.- Returns:
- the width of a string
- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/font/TextHandler;getWidth(Ljava/lang/String;)Fintermediary method_27482Lnet/minecraft/class_5225;method_27482(Ljava/lang/String;)Fofficial aLgem;a(Ljava/lang/String;)F
-
getWidth
Returns the width of a text.- Returns:
- the width of a text
- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/font/TextHandler;getWidth(Lnet/minecraft/text/StringVisitable;)Fintermediary method_27488Lnet/minecraft/class_5225;method_27488(Lnet/minecraft/class_5348;)Fofficial aLgem;a(Lyn;)F
-
getWidth
- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/font/TextHandler;getWidth(Lnet/minecraft/text/OrderedText;)Fintermediary method_30875Lnet/minecraft/class_5225;method_30875(Lnet/minecraft/class_5481;)Fofficial aLgem;a(Lbfq;)F
-
getTrimmedLength
Returns the length of a string when it is trimmed to be at mostmaxWidthwide.- Parameters:
text- the string to trimmaxWidth- the max width of the trimmed stringstyle- the style of the trimmed string- Returns:
- the length of a string when it is trimmed to be at most
maxWidthwide - Mappings:
Namespace Name Mixin selector named getTrimmedLengthLnet/minecraft/client/font/TextHandler;getTrimmedLength(Ljava/lang/String;ILnet/minecraft/text/Style;)Iintermediary method_27484Lnet/minecraft/class_5225;method_27484(Ljava/lang/String;ILnet/minecraft/class_2583;)Iofficial aLgem;a(Ljava/lang/String;ILzf;)I
-
trimToWidth
Trim a string to be at mostmaxWidthwide.- Parameters:
text- the string to trimmaxWidth- the max width of the trimmed stringstyle- the style of the trimmed string- Returns:
- the trimmed string
- Mappings:
Namespace Name Mixin selector named trimToWidthLnet/minecraft/client/font/TextHandler;trimToWidth(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/lang/String;intermediary method_27494Lnet/minecraft/class_5225;method_27494(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/lang/String;official bLgem;b(Ljava/lang/String;ILzf;)Ljava/lang/String;
-
trimToWidthBackwards
Trim a string from right to left to be at mostmaxWidthwide.- Parameters:
text- the string to trimmaxWidth- the max width of the trimmed stringstyle- the style of the trimmed string- Returns:
- the trimmed string
- Mappings:
Namespace Name Mixin selector named trimToWidthBackwardsLnet/minecraft/client/font/TextHandler;trimToWidthBackwards(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/lang/String;intermediary method_27497Lnet/minecraft/class_5225;method_27497(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/lang/String;official cLgem;c(Ljava/lang/String;ILzf;)Ljava/lang/String;
-
trimToWidth
- Mappings:
Namespace Name Mixin selector named trimToWidthLnet/minecraft/client/font/TextHandler;trimToWidth(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;)Lnet/minecraft/text/StringVisitable;intermediary method_27490Lnet/minecraft/class_5225;method_27490(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;)Lnet/minecraft/class_5348;official aLgem;a(Lyn;ILzf;)Lyn;
-
getEndingIndex
- Mappings:
Namespace Name Mixin selector named getEndingIndexLnet/minecraft/client/font/TextHandler;getEndingIndex(Ljava/lang/String;ILnet/minecraft/text/Style;)Iintermediary method_35717Lnet/minecraft/class_5225;method_35717(Ljava/lang/String;ILnet/minecraft/class_2583;)Iofficial dLgem;d(Ljava/lang/String;ILzf;)I
-
moveCursorByWords
public static int moveCursorByWords(String text, int offset, int cursor, boolean consumeSpaceOrBreak) - Mappings:
Namespace Name Mixin selector named moveCursorByWordsLnet/minecraft/client/font/TextHandler;moveCursorByWords(Ljava/lang/String;IIZ)Iintermediary method_27483Lnet/minecraft/class_5225;method_27483(Ljava/lang/String;IIZ)Iofficial aLgem;a(Ljava/lang/String;IIZ)I
-
wrapLines
public void wrapLines(String text, int maxWidth, Style style, boolean retainTrailingWordSplit, TextHandler.LineWrappingConsumer consumer) - Mappings:
Namespace Name Mixin selector named wrapLinesLnet/minecraft/client/font/TextHandler;wrapLines(Ljava/lang/String;ILnet/minecraft/text/Style;ZLnet/minecraft/client/font/TextHandler$LineWrappingConsumer;)Vintermediary method_27485Lnet/minecraft/class_5225;method_27485(Ljava/lang/String;ILnet/minecraft/class_2583;ZLnet/minecraft/class_5225$class_5229;)Vofficial aLgem;a(Ljava/lang/String;ILzf;ZLgem$d;)V
-
wrapLines
- Mappings:
Namespace Name Mixin selector named wrapLinesLnet/minecraft/client/font/TextHandler;wrapLines(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/util/List;intermediary method_27498Lnet/minecraft/class_5225;method_27498(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/util/List;official eLgem;e(Ljava/lang/String;ILzf;)Ljava/util/List;
-
wrapLines
- Mappings:
Namespace Name Mixin selector named wrapLinesLnet/minecraft/client/font/TextHandler;wrapLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;)Ljava/util/List;intermediary method_27495Lnet/minecraft/class_5225;method_27495(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;)Ljava/util/List;official bLgem;b(Lyn;ILzf;)Ljava/util/List;
-
wrapLines
public void wrapLines(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable, Boolean> lineConsumer) - Mappings:
Namespace Name Mixin selector named wrapLinesLnet/minecraft/client/font/TextHandler;wrapLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;Ljava/util/function/BiConsumer;)Vintermediary method_29971Lnet/minecraft/class_5225;method_29971(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;Ljava/util/function/BiConsumer;)Vofficial aLgem;a(Lyn;ILzf;Ljava/util/function/BiConsumer;)V
-