Package net.minecraft.client.font
Class TextHandler
java.lang.Object
net.minecraft.client.font.TextHandler
- Mappings:
Namespace Name named net/minecraft/client/font/TextHandler
intermediary net/minecraft/class_5225
official ffr
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
private static class
static interface
A consumer of the line-breaking information.private static class
private class
static interface
A retriever of character width. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getEndingIndex
(String text, int maxWidth, Style style) int
getLimitedStringLength
(String text, int maxWidth, Style style) getStyleAt
(OrderedText text, int x) Gets the style at thex
position in a text.getStyleAt
(StringVisitable text, int x) Returns the style at thex
position in a text.int
getTrimmedLength
(String text, int maxWidth, Style style) Returns the length of a string when it is trimmed to be at mostmaxWidth
wide.float
Returns the width of a string.float
getWidth
(OrderedText text) float
getWidth
(StringVisitable text) Returns the width of a text.limitString
(String text, int maxWidth, Style style) static int
moveCursorByWords
(String text, int offset, int cursor, boolean consumeSpaceOrBreak) trimToWidth
(String text, int maxWidth, Style style) Trim a string to be at mostmaxWidth
wide.trimToWidth
(StringVisitable text, int width, Style style) trimToWidthBackwards
(String text, int maxWidth, Style style) Trim a string from right to left to be at mostmaxWidth
wide.void
wrapLines
(String text, int maxWidth, Style style, boolean retainTrailingWordSplit, TextHandler.LineWrappingConsumer consumer) wrapLines
(StringVisitable text, int maxWidth, Style style) void
wrapLines
(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable, Boolean> lineConsumer) wrapLines
(StringVisitable text, int maxWidth, Style style, StringVisitable wrappedLinePrefix)
-
Field Details
-
widthRetriever
- Mappings:
Namespace Name Mixin selector named widthRetriever
Lnet/minecraft/client/font/TextHandler;widthRetriever:Lnet/minecraft/client/font/TextHandler$WidthRetriever;
intermediary field_24216
Lnet/minecraft/class_5225;field_24216:Lnet/minecraft/class_5225$class_5231;
official a
Lffr;a:Lffr$f;
-
-
Constructor Details
-
TextHandler
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/client/font/TextHandler;<init>(Lnet/minecraft/client/font/TextHandler$WidthRetriever;)V
intermediary <init>
Lnet/minecraft/class_5225;<init>(Lnet/minecraft/class_5225$class_5231;)V
official <init>
Lffr;<init>(Lffr$f;)V
-
-
Method Details
-
getWidth
Returns the width of a string.- Returns:
- the width of a string
- Mappings:
Namespace Name Mixin selector named getWidth
Lnet/minecraft/client/font/TextHandler;getWidth(Ljava/lang/String;)F
intermediary method_27482
Lnet/minecraft/class_5225;method_27482(Ljava/lang/String;)F
official a
Lffr;a(Ljava/lang/String;)F
-
getWidth
Returns the width of a text.- Returns:
- the width of a text
- Mappings:
Namespace Name Mixin selector named getWidth
Lnet/minecraft/client/font/TextHandler;getWidth(Lnet/minecraft/text/StringVisitable;)F
intermediary method_27488
Lnet/minecraft/class_5225;method_27488(Lnet/minecraft/class_5348;)F
official a
Lffr;a(Lxu;)F
-
getWidth
- Mappings:
Namespace Name Mixin selector named getWidth
Lnet/minecraft/client/font/TextHandler;getWidth(Lnet/minecraft/text/OrderedText;)F
intermediary method_30875
Lnet/minecraft/class_5225;method_30875(Lnet/minecraft/class_5481;)F
official a
Lffr;a(Layl;)F
-
getTrimmedLength
Returns the length of a string when it is trimmed to be at mostmaxWidth
wide.- 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
maxWidth
wide - Mappings:
Namespace Name Mixin selector named getTrimmedLength
Lnet/minecraft/client/font/TextHandler;getTrimmedLength(Ljava/lang/String;ILnet/minecraft/text/Style;)I
intermediary method_27484
Lnet/minecraft/class_5225;method_27484(Ljava/lang/String;ILnet/minecraft/class_2583;)I
official a
Lffr;a(Ljava/lang/String;ILym;)I
-
trimToWidth
Trim a string to be at mostmaxWidth
wide.- 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 trimToWidth
Lnet/minecraft/client/font/TextHandler;trimToWidth(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/lang/String;
intermediary method_27494
Lnet/minecraft/class_5225;method_27494(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/lang/String;
official b
Lffr;b(Ljava/lang/String;ILym;)Ljava/lang/String;
-
trimToWidthBackwards
Trim a string from right to left to be at mostmaxWidth
wide.- 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 trimToWidthBackwards
Lnet/minecraft/client/font/TextHandler;trimToWidthBackwards(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/lang/String;
intermediary method_27497
Lnet/minecraft/class_5225;method_27497(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/lang/String;
official c
Lffr;c(Ljava/lang/String;ILym;)Ljava/lang/String;
-
getLimitedStringLength
- Mappings:
Namespace Name Mixin selector named getLimitedStringLength
Lnet/minecraft/client/font/TextHandler;getLimitedStringLength(Ljava/lang/String;ILnet/minecraft/text/Style;)I
intermediary method_35715
Lnet/minecraft/class_5225;method_35715(Ljava/lang/String;ILnet/minecraft/class_2583;)I
official d
Lffr;d(Ljava/lang/String;ILym;)I
-
getStyleAt
Returns the style at thex
position in a text.- Parameters:
x
- the position in the text- Returns:
- the style at the
x
position in a text - Mappings:
Namespace Name Mixin selector named getStyleAt
Lnet/minecraft/client/font/TextHandler;getStyleAt(Lnet/minecraft/text/StringVisitable;I)Lnet/minecraft/text/Style;
intermediary method_27489
Lnet/minecraft/class_5225;method_27489(Lnet/minecraft/class_5348;I)Lnet/minecraft/class_2583;
official a
Lffr;a(Lxu;I)Lym;
-
getStyleAt
Gets the style at thex
position in a text.- Parameters:
x
- the position in the text- Returns:
- a style
- Mappings:
Namespace Name Mixin selector named getStyleAt
Lnet/minecraft/client/font/TextHandler;getStyleAt(Lnet/minecraft/text/OrderedText;I)Lnet/minecraft/text/Style;
intermediary method_30876
Lnet/minecraft/class_5225;method_30876(Lnet/minecraft/class_5481;I)Lnet/minecraft/class_2583;
official a
Lffr;a(Layl;I)Lym;
-
limitString
- Mappings:
Namespace Name Mixin selector named limitString
Lnet/minecraft/client/font/TextHandler;limitString(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/lang/String;
intermediary method_35716
Lnet/minecraft/class_5225;method_35716(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/lang/String;
official e
Lffr;e(Ljava/lang/String;ILym;)Ljava/lang/String;
-
trimToWidth
- Mappings:
Namespace Name Mixin selector named trimToWidth
Lnet/minecraft/client/font/TextHandler;trimToWidth(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;)Lnet/minecraft/text/StringVisitable;
intermediary method_27490
Lnet/minecraft/class_5225;method_27490(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;)Lnet/minecraft/class_5348;
official a
Lffr;a(Lxu;ILym;)Lxu;
-
getEndingIndex
- Mappings:
Namespace Name Mixin selector named getEndingIndex
Lnet/minecraft/client/font/TextHandler;getEndingIndex(Ljava/lang/String;ILnet/minecraft/text/Style;)I
intermediary method_35717
Lnet/minecraft/class_5225;method_35717(Ljava/lang/String;ILnet/minecraft/class_2583;)I
official f
Lffr;f(Ljava/lang/String;ILym;)I
-
moveCursorByWords
public static int moveCursorByWords(String text, int offset, int cursor, boolean consumeSpaceOrBreak) - Mappings:
Namespace Name Mixin selector named moveCursorByWords
Lnet/minecraft/client/font/TextHandler;moveCursorByWords(Ljava/lang/String;IIZ)I
intermediary method_27483
Lnet/minecraft/class_5225;method_27483(Ljava/lang/String;IIZ)I
official a
Lffr;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 wrapLines
Lnet/minecraft/client/font/TextHandler;wrapLines(Ljava/lang/String;ILnet/minecraft/text/Style;ZLnet/minecraft/client/font/TextHandler$LineWrappingConsumer;)V
intermediary method_27485
Lnet/minecraft/class_5225;method_27485(Ljava/lang/String;ILnet/minecraft/class_2583;ZLnet/minecraft/class_5225$class_5229;)V
official a
Lffr;a(Ljava/lang/String;ILym;ZLffr$d;)V
-
wrapLines
- Mappings:
Namespace Name Mixin selector named wrapLines
Lnet/minecraft/client/font/TextHandler;wrapLines(Ljava/lang/String;ILnet/minecraft/text/Style;)Ljava/util/List;
intermediary method_27498
Lnet/minecraft/class_5225;method_27498(Ljava/lang/String;ILnet/minecraft/class_2583;)Ljava/util/List;
official g
Lffr;g(Ljava/lang/String;ILym;)Ljava/util/List;
-
wrapLines
- Mappings:
Namespace Name Mixin selector named wrapLines
Lnet/minecraft/client/font/TextHandler;wrapLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;)Ljava/util/List;
intermediary method_27495
Lnet/minecraft/class_5225;method_27495(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;)Ljava/util/List;
official b
Lffr;b(Lxu;ILym;)Ljava/util/List;
-
wrapLines
public List<StringVisitable> wrapLines(StringVisitable text, int maxWidth, Style style, StringVisitable wrappedLinePrefix) - Mappings:
Namespace Name Mixin selector named wrapLines
Lnet/minecraft/client/font/TextHandler;wrapLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;Lnet/minecraft/text/StringVisitable;)Ljava/util/List;
intermediary method_35714
Lnet/minecraft/class_5225;method_35714(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;Lnet/minecraft/class_5348;)Ljava/util/List;
official a
Lffr;a(Lxu;ILym;Lxu;)Ljava/util/List;
-
wrapLines
public void wrapLines(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable, Boolean> lineConsumer) - Mappings:
Namespace Name Mixin selector named wrapLines
Lnet/minecraft/client/font/TextHandler;wrapLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/text/Style;Ljava/util/function/BiConsumer;)V
intermediary method_29971
Lnet/minecraft/class_5225;method_29971(Lnet/minecraft/class_5348;ILnet/minecraft/class_2583;Ljava/util/function/BiConsumer;)V
official a
Lffr;a(Lxu;ILym;Ljava/util/function/BiConsumer;)V
-