Uses of Class
net.minecraft.text.Style
Packages that use Style
Package
Description
-
Uses of Style in net.minecraft.client.font
Fields in net.minecraft.client.font declared as StyleModifier and TypeFieldDescriptionprivate Style
TextHandler.LineBreakingVisitor.endStyle
private Style
TextHandler.LineBreakingVisitor.lastSpaceStyle
private final Style
BakedGlyph.DrawnGlyph.style
The field for thestyle
record component.(package private) final Style
TextHandler.StyledString.style
Methods in net.minecraft.client.font that return StyleModifier and TypeMethodDescriptionTextHandler.LineBreakingVisitor.getEndingStyle()
TextHandler.getStyleAt
(OrderedText text, int x) Gets the style at thex
position in a text.TextHandler.getStyleAt
(StringVisitable text, int x) Returns the style at thex
position in a text.BakedGlyph.DrawnGlyph.style()
Returns the value of thestyle
record component.Methods in net.minecraft.client.font with parameters of type StyleModifier and TypeMethodDescriptionboolean
Visits a single character.void
Accepts the information on a line-wrap segment.boolean
Visits a single character.boolean
Visits a single character.private boolean
TextHandler.LineWrappingCollector.collectLine
(int lineLength, int skippedLength, Style style) int
TextHandler.getEndingIndex
(String text, int maxWidth, Style style) int
TextHandler.getLimitedStringLength
(String text, int maxWidth, Style style) int
TextHandler.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 character.TextHandler.limitString
(String text, int maxWidth, Style style) TextHandler.trimToWidth
(String text, int maxWidth, Style style) Trim a string to be at mostmaxWidth
wide.TextHandler.trimToWidth
(StringVisitable text, int width, Style style) TextHandler.trimToWidthBackwards
(String text, int maxWidth, Style style) Trim a string from right to left to be at mostmaxWidth
wide.<T> Optional
<T> TextHandler.StyledString.visit
(StringVisitable.StyledVisitor<T> styledVisitor, Style style) Supplies this visitable's literal content and contextual style to the visitor.void
TextHandler.wrapLines
(String text, int maxWidth, Style style, boolean retainTrailingWordSplit, TextHandler.LineWrappingConsumer consumer) TextHandler.wrapLines
(StringVisitable text, int maxWidth, Style style) void
TextHandler.wrapLines
(StringVisitable text, int maxWidth, Style style, BiConsumer<StringVisitable, Boolean> lineConsumer) TextHandler.wrapLines
(StringVisitable text, int maxWidth, Style style, StringVisitable wrappedLinePrefix) Constructors in net.minecraft.client.font with parameters of type StyleModifierConstructorDescriptionDrawnGlyph
(float float2, float float3, int int2, BakedGlyph bakedGlyph, Style style, float float4) StyledString
(String literal, Style style) -
Uses of Style in net.minecraft.client.gui
Methods in net.minecraft.client.gui with parameters of type StyleModifier and TypeMethodDescriptionvoid
DrawContext.drawHoverEvent
(TextRenderer textRenderer, @Nullable Style style, int x, int y) -
Uses of Style in net.minecraft.client.gui.hud
Methods in net.minecraft.client.gui.hud that return Style -
Uses of Style in net.minecraft.client.gui.screen
Fields in net.minecraft.client.gui.screen declared as StyleModifier and TypeFieldDescriptionprivate static final Style
ChatInputSuggestor.ERROR_STYLE
private static final Style
ChatInputSuggestor.INFO_STYLE
Fields in net.minecraft.client.gui.screen with type parameters of type StyleMethods in net.minecraft.client.gui.screen that return StyleModifier and TypeMethodDescriptionDeathScreen.getTextComponentUnderMouse
(int mouseX) ChatScreen.getTextStyleAt
(double x, double y) Methods in net.minecraft.client.gui.screen with parameters of type Style -
Uses of Style in net.minecraft.client.gui.screen.ingame
Fields in net.minecraft.client.gui.screen.ingame declared as StyleModifier and TypeFieldDescription(package private) final Style
BookEditScreen.Line.style
private static final Style
EnchantingPhrases.STYLE
Methods in net.minecraft.client.gui.screen.ingame that return StyleMethods in net.minecraft.client.gui.screen.ingame with parameters of type StyleConstructors in net.minecraft.client.gui.screen.ingame with parameters of type Style -
Uses of Style in net.minecraft.client.network.message
Methods in net.minecraft.client.network.message with parameters of type StyleModifier and TypeMethodDescriptionprivate static boolean
MessageTrustStatus.isNotInDefaultFont
(Style style) -
Uses of Style in net.minecraft.command.argument
Methods in net.minecraft.command.argument that return Style -
Uses of Style in net.minecraft.component.type
Fields in net.minecraft.component.type declared as Style -
Uses of Style in net.minecraft.entity.damage
Fields in net.minecraft.entity.damage declared as StyleModifier and TypeFieldDescriptionprivate static final Style
DamageTracker.INTENTIONAL_GAME_DESIGN_ISSUE_LINK_STYLE
-
Uses of Style in net.minecraft.item.equipment.trim
Methods in net.minecraft.item.equipment.trim with parameters of type StyleModifier and TypeMethodDescriptionprivate static void
ArmorTrimMaterials.register
(Registerable<ArmorTrimMaterial> registry, RegistryKey<ArmorTrimMaterial> key, Item ingredient, Style style, float itemModelIndex) private static void
ArmorTrimMaterials.register
(Registerable<ArmorTrimMaterial> registry, RegistryKey<ArmorTrimMaterial> key, Item ingredient, Style style, float itemModelIndex, Map<Identifier, String> overrideArmorMaterials) -
Uses of Style in net.minecraft.network.message
Fields in net.minecraft.network.message declared as Style -
Uses of Style in net.minecraft.scoreboard
Fields in net.minecraft.scoreboard declared as Style -
Uses of Style in net.minecraft.scoreboard.number
Fields in net.minecraft.scoreboard.number declared as StyleConstructors in net.minecraft.scoreboard.number with parameters of type Style -
Uses of Style in net.minecraft.server.command
Fields in net.minecraft.server.command declared as Style -
Uses of Style in net.minecraft.text
Fields in net.minecraft.text declared as StyleModifier and TypeFieldDescriptionstatic final Style
Style.EMPTY
An empty style.private final Style
Decoration.style
The field for thestyle
record component.private Style
MutableText.style
Fields in net.minecraft.text with type parameters of type StyleModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<Style> Style.Codecs.CODEC
static final com.mojang.serialization.MapCodec
<Style> Style.Codecs.MAP_CODEC
static final PacketCodec
<RegistryByteBuf, Style> Style.Codecs.PACKET_CODEC
TextReorderingProcessor.styles
Methods in net.minecraft.text that return StyleModifier and TypeMethodDescriptionMutableText.getStyle()
Returns the style of this text.Text.getStyle()
Returns the style of this text.private static Style
Style.of
(Optional<TextColor> color, Optional<Boolean> bold, Optional<Boolean> italic, Optional<Boolean> underlined, Optional<Boolean> strikethrough, Optional<Boolean> obfuscated, Optional<ClickEvent> optional, Optional<HoverEvent> optional2, Optional<String> optional3, Optional<Identifier> optional4) private static Style
Texts.parseStyle
(@Nullable ServerCommandSource source, Style style, @Nullable Entity sender, int depth) Decoration.style()
Returns the value of thestyle
record component.private static <T> Style
Returns a new style with the bold attribute provided and all other attributes of this style.Style.withClickEvent
(@Nullable ClickEvent clickEvent) Returns a new style with the click event provided and all other attributes of this style.Style.withColor
(int rgbColor) Returns a new style with the color provided and all other attributes of this style.Style.withColor
(@Nullable Formatting color) Returns a new style with the color provided and all other attributes of this style.Style.withExclusiveFormatting
(Formatting formatting) Returns a new style with the formatting provided and some applicable attributes of this style.Style.withFont
(@Nullable Identifier font) Returns a new style with the font provided and all other attributes of this style.Style.withFormatting
(Formatting formatting) Returns a new style with the formatting provided and all other attributes of this style.Style.withFormatting
(Formatting[] formattings) Returns a new style with the formattings provided and all other attributes of this style.Style.withHoverEvent
(@Nullable HoverEvent hoverEvent) Returns a new style with the hover event provided and all other attributes of this style.Style.withInsertion
(@Nullable String insertion) Returns a new style with the insertion provided and all other attributes of this style.Style.withItalic
(@Nullable Boolean italic) Returns a new style with the italic attribute provided and all other attributes of this style.Style.withObfuscated
(@Nullable Boolean obfuscated) Style.withParent
(Style parent) Returns a new style with the undefined attributes of this style filled by theparent
style.Style.withStrikethrough
(@Nullable Boolean strikethrough) Style.withUnderline
(@Nullable Boolean underline) Returns a new style with the underline attribute provided and all other attributes of this style.Methods in net.minecraft.text with parameters of type StyleModifier and TypeMethodDescriptionboolean
Visits a single character.Visits a string's content with a contextual style.Fills the absent parts of this text's style with definitions fromstyleOverride
.Text.getWithStyle
(Style style) private static Style
Texts.parseStyle
(@Nullable ServerCommandSource source, Style style, @Nullable Entity sender, int depth) Sets the style of this text.static MutableText
Texts.setStyleIfAbsent
(MutableText text, Style style) static OrderedText
static StringVisitable
Creates a visitable from a plain string and a root style.static OrderedText
OrderedText.styledBackwardsVisitedString
(String string, Style style) static OrderedText
OrderedText.styledBackwardsVisitedString
(String string, Style style, Int2IntFunction codePointMapper) static OrderedText
OrderedText.styledForwardsVisitedString
(String string, Style style) static OrderedText
OrderedText.styledForwardsVisitedString
(String string, Style style, Int2IntFunction codePointMapper) <T> Optional
<T> KeybindTextContent.visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<T> Optional
<T> PlainTextContent.Literal.visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<T> Optional
<T> SelectorTextContent.visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<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.default <T> Optional
<T> TextContent.visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<T> Optional
<T> TranslatableTextContent.visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.static boolean
TextVisitFactory.visitBackwards
(String text, Style style, CharacterVisitor visitor) Visits the code points of a string in backward (right to left) direction.static boolean
TextVisitFactory.visitFormatted
(String text, int startIndex, Style style, CharacterVisitor visitor) Visits the code points of a string, applying the formatting codes within.static boolean
TextVisitFactory.visitFormatted
(String text, int startIndex, Style startingStyle, Style resetStyle, CharacterVisitor visitor) Visits the code points of a string, applying the formatting codes within.static boolean
TextVisitFactory.visitFormatted
(String text, Style style, CharacterVisitor visitor) Visits the code points of a string, applying the formatting codes within.static boolean
TextVisitFactory.visitFormatted
(StringVisitable text, Style style, CharacterVisitor visitor) Visits the code points for every literal string and the formatting codes supplied by the renderable.static boolean
TextVisitFactory.visitForwards
(String text, Style style, CharacterVisitor visitor) Visits the code points of a string in forward (left to right) direction.private static boolean
TextVisitFactory.visitRegularCharacter
(Style style, CharacterVisitor visitor, int index, char c) private static <T> Style
Style.withParent
(Style parent) Returns a new style with the undefined attributes of this style filled by theparent
style.Method parameters in net.minecraft.text with type arguments of type StyleModifier and TypeMethodDescriptionMutableText.styled
(UnaryOperator<Style> styleUpdater) Updates the style of this text.Constructors in net.minecraft.text with parameters of type StyleModifierConstructorDescriptionDecoration
(String string, List<Decoration.Parameter> list, Style style) (package private)
MutableText
(TextContent content, List<Text> siblings, Style style) Constructor parameters in net.minecraft.text with type arguments of type StyleModifierConstructorDescriptionprivate
TextReorderingProcessor
(String string, List<Style> styles, Int2IntFunction reverser)