类的使用
net.minecraft.text.Style
-
-
net.minecraft.client.font中Style的使用
声明为Style的net.minecraft.client.font中的字段 修饰符和类型 字段 说明 private StyleTextHandler.LineBreakingVisitor. endStyleprivate StyleTextHandler.LineBreakingVisitor. lastSpaceStyleprivate StyleTextHandler.StyledString. style返回Style的net.minecraft.client.font中的方法 修饰符和类型 方法 说明 StyleTextHandler.LineBreakingVisitor. getEndingStyle()@Nullable StyleTextHandler. getStyleAt(OrderedText text, int x)Gets the style at thexposition in a text.@Nullable StyleTextHandler. getStyleAt(StringVisitable text, int x)Gets the style at thexposition in a text.参数类型为Style的net.minecraft.client.font中的方法 修饰符和类型 方法 说明 booleanTextHandler.LineBreakingVisitor. accept(int index, Style style, int codePoint)Visits a single character.voidTextHandler.LineWrappingConsumer. accept(Style style, int start, int end)Accepts the information on a line-wrap segment.booleanTextHandler.WidthLimitingVisitor. accept(int index, Style style, int codePoint)Visits a single character.booleanTextRenderer.Drawer. accept(int index, Style style, int codePoint)Visits a single character.private booleanTextHandler.LineBreakingVisitor. breakLine(int finishIndex, Style finishStyle)StringVisitableTextHandler.LineWrappingCollector. collectLine(int lineLength, int skippedLength, Style style)intTextHandler. getTrimmedLength(String text, int maxWidth, Style style)Returns the length of a string when it is trimmed to be at mostmaxWidthwide.floatTextHandler.WidthRetriever. getWidth(int codePoint, Style style)Returns the width of a character.List<StringVisitable>TextHandler. method_35714(StringVisitable stringVisitable, int int2, Style style, StringVisitable stringVisitable2)intTextHandler. method_35715(String string, int int2, Style style)StringTextHandler. method_35716(String string, int int2, Style style)intTextHandler. method_35717(String string, int int2, Style style)StringTextHandler. trimToWidth(String text, int maxWidth, Style style)Trim a string to be at mostmaxWidthwide.StringVisitableTextHandler. trimToWidth(StringVisitable text, int width, Style style)StringTextHandler. trimToWidthBackwards(String text, int maxWidth, Style style)Trim a string from right to left to be at mostmaxWidthwide.<T> Optional<T>TextHandler.StyledString. visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)Supplies this visitable's literal content and contextual style to the visitor.static booleanTextVisitFactory. visitBackwards(String text, Style style, CharacterVisitor visitor)Visits the code points of a string in backward (right to left) direction.static booleanTextVisitFactory. visitFormatted(String text, int startIndex, Style style, CharacterVisitor visitor)Visits the code points of a string, applying the formatting codes within.static booleanTextVisitFactory. visitFormatted(String text, int startIndex, Style startingStyle, Style resetStyle, CharacterVisitor visitor)Visits the code points of a string, applying the formatting codes within.static booleanTextVisitFactory. visitFormatted(String text, Style style, CharacterVisitor visitor)Visits the code points of a string, applying the formatting codes within.static booleanTextVisitFactory. visitFormatted(StringVisitable text, Style style, CharacterVisitor visitor)Visits the code points for every literal string and the formatting codes supplied by the renderable.static booleanTextVisitFactory. visitForwards(String text, Style style, CharacterVisitor visitor)Visits the code points of a string in forward (left to right) direction.private static booleanTextVisitFactory. visitRegularCharacter(Style style, CharacterVisitor visitor, int index, char c)List<StringVisitable>TextHandler. wrapLines(String text, int maxWidth, Style style)voidTextHandler. wrapLines(String text, int maxWidth, Style style, boolean retainTrailingWordSplit, TextHandler.LineWrappingConsumer consumer)List<StringVisitable>TextHandler. wrapLines(StringVisitable text, int maxWidth, Style style)voidTextHandler. wrapLines(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable,Boolean> biConsumer)参数类型为Style的net.minecraft.client.font中的构造器 构造器 说明 StyledString(String literal, Style style) -
net.minecraft.client.gui.hud中Style的使用
返回Style的net.minecraft.client.gui.hud中的方法 修饰符和类型 方法 说明 @Nullable StyleChatHud. getText(double x, double y) -
net.minecraft.client.gui.screen中Style的使用
声明为Style的net.minecraft.client.gui.screen中的字段 修饰符和类型 字段 说明 private static StyleCommandSuggestor. ERROR_FORMATTINGprivate static StyleCommandSuggestor. INFO_FORMATTING类型参数类型为Style的net.minecraft.client.gui.screen中的字段 修饰符和类型 字段 说明 private static List<Style>CommandSuggestor. HIGHLIGHT_FORMATTINGS返回Style的net.minecraft.client.gui.screen中的方法 修饰符和类型 方法 说明 private @Nullable StyleDeathScreen. getTextComponentUnderMouse(int mouseX)参数类型为Style的net.minecraft.client.gui.screen中的方法 修饰符和类型 方法 说明 booleanScreen. handleTextClick(@Nullable Style style)protected voidScreen. renderTextHoverEffect(MatrixStack matrices, @Nullable Style style, int x, int y) -
net.minecraft.client.gui.screen.ingame中Style的使用
声明为Style的net.minecraft.client.gui.screen.ingame中的字段 修饰符和类型 字段 说明 private StyleBookEditScreen.Line. styleprivate static StyleEnchantingPhrases. STYLE返回Style的net.minecraft.client.gui.screen.ingame中的方法 修饰符和类型 方法 说明 @Nullable StyleBookScreen. getTextAt(double x, double y)参数类型为Style的net.minecraft.client.gui.screen.ingame中的方法 修饰符和类型 方法 说明 booleanBookScreen. handleTextClick(Style style)参数类型为Style的net.minecraft.client.gui.screen.ingame中的构造器 构造器 说明 Line(Style style, String content, int x, int y) -
net.minecraft.client.resource.language中Style的使用
类型参数类型为Style的net.minecraft.client.resource.language中的字段 修饰符和类型 字段 说明 private List<Style>TextReorderingProcessor. styles类型变量类型为Style的net.minecraft.client.resource.language中的构造器参数 构造器 说明 TextReorderingProcessor(String string, List<Style> styles, Int2IntFunction reverser) -
net.minecraft.item中Style的使用
声明为Style的net.minecraft.item中的字段 修饰符和类型 字段 说明 private static StyleItemStack. LORE_STYLE -
net.minecraft.scoreboard中Style的使用
声明为Style的net.minecraft.scoreboard中的字段 修饰符和类型 字段 说明 private StyleTeam. nameStyle -
net.minecraft.server.command中Style的使用
声明为Style的net.minecraft.server.command中的字段 修饰符和类型 字段 说明 private static StyleTeamMsgCommand. STYLE -
net.minecraft.text中Style的使用
声明为Style的net.minecraft.text中的字段 修饰符和类型 字段 说明 static StyleStyle. EMPTYAn empty style.private StyleBaseText. style返回Style的net.minecraft.text中的方法 修饰符和类型 方法 说明 @Nullable StyleStyle.Serializer. deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext)StyleBaseText. getStyle()Returns the style of this text.StyleText. getStyle()Returns the style of this text.StyleStyle. obfuscated(@Nullable Boolean obfuscated)private static StyleTexts. parseStyle(@Nullable ServerCommandSource source, Style style, @Nullable Entity sender, int depth)StyleStyle. withBold(@Nullable Boolean bold)Returns a new style with the bold attribute provided and all other attributes of this style.StyleStyle. withClickEvent(@Nullable ClickEvent clickEvent)Returns a new style with the click event provided and all other attributes of this style.StyleStyle. withColor(int rgbColor)StyleStyle. withColor(@Nullable TextColor color)Returns a new style with the color provided and all other attributes of this style.StyleStyle. withColor(@Nullable Formatting color)Returns a new style with the color provided and all other attributes of this style.StyleStyle. withExclusiveFormatting(Formatting formatting)Returns a new style with the formatting provided and some applicable attributes of this style.StyleStyle. withFont(@Nullable Identifier font)Returns a new style with the font provided and all other attributes of this style.StyleStyle. withFormatting(Formatting formatting)Returns a new style with the formatting provided and all other attributes of this style.StyleStyle. withFormatting(Formatting[] formattings)Returns a new style with the formattings provided and all other attributes of this style.StyleStyle. withHoverEvent(@Nullable HoverEvent hoverEvent)Returns a new style with the hover event provided and all other attributes of this style.StyleStyle. withInsertion(@Nullable String insertion)Returns a new style with the insertion provided and all other attributes of this style.StyleStyle. withItalic(@Nullable Boolean italic)Returns a new style with the italic attribute provided and all other attributes of this style.StyleStyle. withParent(Style parent)Returns a new style with the undefined attributes of this style filled by theparentstyle.StyleStyle. withStrikethrough(@Nullable Boolean strikethrough)StyleStyle. withUnderline(@Nullable Boolean underline)Returns a new style with the underline attribute provided and all other attributes of this style.参数类型为Style的net.minecraft.text中的方法 修饰符和类型 方法 说明 booleanCharacterVisitor. accept(int index, Style style, int codePoint)Visits a single character.Optional<T>StringVisitable.StyledVisitor. accept(Style style, String asString)Visits a string's content with a contextual style.private voidText.Serializer. addStyle(Style style, JsonObject json, JsonSerializationContext context)default MutableTextMutableText. fillStyle(Style styleOverride)Fills the absent parts of this text's style with definitions fromstyleOverride.static OrderedTextOrderedText. method_34908(String string, Style style, Int2IntFunction int2IntFunction)static OrderedTextOrderedText. method_34910(String string, Style style)default List<Text>Text. method_36136(Style style)private static StyleTexts. parseStyle(@Nullable ServerCommandSource source, Style style, @Nullable Entity sender, int depth)@Nullable JsonElementStyle.Serializer. serialize(Style style, Type type, JsonSerializationContext jsonSerializationContext)MutableTextBaseText. setStyle(Style style)Sets the style of this text.MutableTextMutableText. setStyle(Style style)Sets the style of this text.static MutableTextTexts. setStyleIfAbsent(MutableText text, Style style)static OrderedTextOrderedText. styled(int codePoint, Style style)static StringVisitableStringVisitable. styled(String string, Style style)Creates a visitable from a plain string and a root style.static OrderedTextOrderedText. styledString(String string, Style style)static OrderedTextOrderedText. styledStringMapped(String string, Style style, Int2IntFunction codePointMapper)<T> Optional<T>StringVisitable. visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)Supplies this visitable's literal content and contextual style to the visitor.default <T> Optional<T>Text. visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)Supplies this visitable's literal content and contextual style to the visitor.<T> Optional<T>KeybindText. visitSelf(StringVisitable.StyledVisitor<T> visitor, Style style)Visits the text itself.default <T> Optional<T>Text. visitSelf(StringVisitable.StyledVisitor<T> visitor, Style style)Visits the text itself.<T> Optional<T>TranslatableText. visitSelf(StringVisitable.StyledVisitor<T> visitor, Style style)Visits the text itself.StyleStyle. withParent(Style parent)Returns a new style with the undefined attributes of this style filled by theparentstyle.类型变量类型为Style的net.minecraft.text中的方法参数 修饰符和类型 方法 说明 default MutableTextMutableText. styled(UnaryOperator<Style> styleUpdater)Updates the style of this text.
-