Uses of Class
net.minecraft.network.chat.Style
Packages that use Style
Package
Description
-
Uses of Style in net.minecraft.client
Fields in net.minecraft.client declared as StyleModifier and TypeFieldDescriptionprivate Style
StringSplitter.LineBreakFinder.lastSpaceStyle
private Style
StringSplitter.LineBreakFinder.lineBreakStyle
(package private) final Style
StringSplitter.LineComponent.style
Methods in net.minecraft.client that return StyleModifier and TypeMethodDescriptionStringSplitter.componentStyleAtWidth
(FormattedText content, int maxWidth) StringSplitter.componentStyleAtWidth
(FormattedCharSequence content, int maxWidth) StringSplitter.LineBreakFinder.getSplitStyle()
Methods in net.minecraft.client with parameters of type StyleModifier and TypeMethodDescriptionboolean
Accepts a single code point from aFormattedCharSequence
.void
boolean
StringSplitter.WidthLimitedCharSink.accept
(int positionInCurrentSequence, Style style, int codePoint) Accepts a single code point from aFormattedCharSequence
.int
StringSplitter.findLineBreak
(String content, int maxWidth, Style style) private boolean
StringSplitter.LineBreakFinder.finishIteration
(int lineBreak, Style lineBreakStyle) StringSplitter.formattedHeadByWidth
(String content, int maxWidth, Style style) int
StringSplitter.formattedIndexByWidth
(String content, int maxWidth, Style style) float
StringSplitter.headByWidth
(FormattedText content, int maxWidth, Style style) StringSplitter.plainHeadByWidth
(String content, int maxWidth, Style style) int
StringSplitter.plainIndexAtWidth
(String content, int maxWidth, Style style) StringSplitter.plainTailByWidth
(String content, int maxWidth, Style style) StringSplitter.splitLines
(String content, int maxWidth, Style style) void
StringSplitter.splitLines
(String content, int maxWidth, Style p_style, boolean withNewLines, StringSplitter.LinePosConsumer linePos) StringSplitter.splitLines
(FormattedText content, int maxWidth, Style style) void
StringSplitter.splitLines
(FormattedText content, int maxWidth, Style p_style, BiConsumer<FormattedText, Boolean> splitifier) StringSplitter.splitLines
(FormattedText content, int maxWidth, Style style, FormattedText prefix) <T> Optional
<T> StringSplitter.LineComponent.visit
(FormattedText.StyledContentConsumer<T> acceptor, Style style) Constructors in net.minecraft.client with parameters of type Style -
Uses of Style in net.minecraft.client.gui
Methods in net.minecraft.client.gui with parameters of type StyleModifier and TypeMethodDescriptionboolean
Accepts a single code point from aFormattedCharSequence
.void
GuiGraphics.renderComponentHoverEffect
(Font font, Style style, int mouseX, int mouseY) Renders a hover effect for a text component at the specified mouse coordinates. -
Uses of Style in net.minecraft.client.gui.components
Fields in net.minecraft.client.gui.components declared as StyleModifier and TypeFieldDescriptionprivate static final Style
CommandSuggestions.LITERAL_STYLE
private static final Style
CommandSuggestions.UNPARSED_STYLE
Fields in net.minecraft.client.gui.components with type parameters of type StyleMethods in net.minecraft.client.gui.components that return StyleModifier and TypeMethodDescriptionChatComponent.getClickedComponentStyleAt
(double mouseX, double mouseY) -
Uses of Style in net.minecraft.client.gui.screens
Methods in net.minecraft.client.gui.screens that return StyleModifier and TypeMethodDescriptionprivate Style
DeathScreen.getClickedComponentStyleAt
(int x) private Style
ChatScreen.getComponentStyleAt
(double mouseX, double mouseY) Methods in net.minecraft.client.gui.screens with parameters of type Style -
Uses of Style in net.minecraft.client.gui.screens.inventory
Fields in net.minecraft.client.gui.screens.inventory declared as StyleModifier and TypeFieldDescriptionprivate static final Style
EnchantmentNames.ROOT_STYLE
(package private) final Style
BookEditScreen.LineInfo.style
Methods in net.minecraft.client.gui.screens.inventory that return StyleModifier and TypeMethodDescriptionBookViewScreen.getClickedComponentStyleAt
(double mouseX, double mouseY) Methods in net.minecraft.client.gui.screens.inventory with parameters of type StyleConstructors in net.minecraft.client.gui.screens.inventory with parameters of type Style -
Uses of Style in net.minecraft.client.multiplayer.chat
Methods in net.minecraft.client.multiplayer.chat with parameters of type StyleModifier and TypeMethodDescriptionprivate static boolean
ChatTrustLevel.isModifiedStyle
(Style style) -
Uses of Style in net.minecraft.commands.arguments
Methods in net.minecraft.commands.arguments that return Style -
Uses of Style in net.minecraft.network.chat
Fields in net.minecraft.network.chat declared as StyleModifier and TypeFieldDescriptionstatic final Style
Style.EMPTY
static final Style
FilterMask.FILTERED_STYLE
private final Style
ChatTypeDecoration.style
The field for thestyle
record component.private Style
MutableComponent.style
Fields in net.minecraft.network.chat with type parameters of type StyleModifier and TypeFieldDescriptionSubStringSource.charStyles
static final com.mojang.serialization.Codec
<Style> Style.Serializer.CODEC
static final com.mojang.serialization.MapCodec
<Style> Style.Serializer.MAP_CODEC
static final StreamCodec
<RegistryFriendlyByteBuf, Style> Style.Serializer.TRUSTED_STREAM_CODEC
Methods in net.minecraft.network.chat that return StyleModifier and TypeMethodDescriptionStyle.applyFormat
(ChatFormatting formatting) Style.applyFormats
(ChatFormatting... formats) Style.applyLegacyFormat
(ChatFormatting formatting) Merges the style with another one.private static <T> Style
Style.checkEmptyAfterChange
(Style style, T oldValue, T newValue) private static Style
Style.create
(Optional<TextColor> color, Optional<Boolean> bold, Optional<Boolean> italic, Optional<Boolean> underlined, Optional<Boolean> strikethrough, Optional<Boolean> obfuscated, Optional<ClickEvent> clickEvent, Optional<HoverEvent> hoverEvent, Optional<String> insertion, Optional<ResourceLocation> font) Component.getStyle()
MutableComponent.getStyle()
private static Style
ComponentUtils.resolveStyle
(CommandSourceStack commandSourceStack, Style style, Entity entity, int recursionDepth) ChatTypeDecoration.style()
Returns the value of thestyle
record component.Style.withClickEvent
(ClickEvent clickEvent) Style.withColor
(int rgb) Style.withColor
(ChatFormatting formatting) Style.withFont
(ResourceLocation fontId) Style.withHoverEvent
(HoverEvent hoverEvent) Style.withInsertion
(String insertion) Style.withItalic
(Boolean italic) Style.withObfuscated
(Boolean obfuscated) Style.withStrikethrough
(Boolean strikethrough) Style.withUnderlined
(Boolean underlined) Methods in net.minecraft.network.chat with parameters of type StyleModifier and TypeMethodDescriptionMerges the style with another one.private static <T> Style
Style.checkEmptyAfterChange
(Style style, T oldValue, T newValue) static MutableComponent
ComponentUtils.mergeStyles
(MutableComponent component, Style p_style) Merge the component's styles with the given Style.static FormattedText
private static Style
ComponentUtils.resolveStyle
(CommandSourceStack commandSourceStack, Style style, Entity entity, int recursionDepth) Sets the style for this component and returns the component itself.Component.toFlatList
(Style style) default <T> Optional
<T> Component.visit
(FormattedText.StyledContentConsumer<T> acceptor, Style p_style) default <T> Optional
<T> ComponentContents.visit
(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style) <T> Optional
<T> FormattedText.visit
(FormattedText.StyledContentConsumer<T> acceptor, Style style) Method parameters in net.minecraft.network.chat with type arguments of type StyleConstructors in net.minecraft.network.chat with parameters of type StyleModifierConstructorDescriptionChatTypeDecoration
(String translationKey, List<ChatTypeDecoration.Parameter> parameters, Style style) Creates an instance of aChatTypeDecoration
record class.(package private)
MutableComponent
(ComponentContents contents, List<Component> siblings, Style style) Constructor parameters in net.minecraft.network.chat with type arguments of type StyleModifierConstructorDescriptionprivate
SubStringSource
(String plainText, List<Style> charStyles, it.unimi.dsi.fastutil.ints.Int2IntFunction reverseCharModifier) -
Uses of Style in net.minecraft.network.chat.contents
Methods in net.minecraft.network.chat.contents with parameters of type StyleModifier and TypeMethodDescription<T> Optional
<T> KeybindContents.visit
(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style) <T> Optional
<T> PlainTextContents.LiteralContents.visit
(FormattedText.StyledContentConsumer<T> p_304890_, Style p_304907_) <T> Optional
<T> SelectorContents.visit
(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style) <T> Optional
<T> TranslatableContents.visit
(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style) -
Uses of Style in net.minecraft.network.chat.numbers
Fields in net.minecraft.network.chat.numbers declared as StyleConstructors in net.minecraft.network.chat.numbers with parameters of type Style -
Uses of Style in net.minecraft.server.commands
Fields in net.minecraft.server.commands declared as Style -
Uses of Style in net.minecraft.util
Methods in net.minecraft.util with parameters of type StyleModifier and TypeMethodDescriptionboolean
Accepts a single code point from aFormattedCharSequence
.static FormattedCharSequence
static FormattedCharSequence
FormattedCharSequence.backward
(String text, Style style, it.unimi.dsi.fastutil.ints.Int2IntFunction codePointMapper) static FormattedCharSequence
private static boolean
StringDecomposer.feedChar
(Style style, FormattedCharSink sink, int position, char character) static FormattedCharSequence
static FormattedCharSequence
FormattedCharSequence.forward
(String text, Style style, it.unimi.dsi.fastutil.ints.Int2IntFunction codePointMapper) static boolean
StringDecomposer.iterate
(String text, Style style, FormattedCharSink sink) static boolean
StringDecomposer.iterateBackwards
(String text, Style style, FormattedCharSink sink) static boolean
StringDecomposer.iterateFormatted
(String text, int skip, Style currentStyle, Style defaultStyle, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
StringDecomposer.iterateFormatted
(String text, int skip, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
StringDecomposer.iterateFormatted
(String text, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
StringDecomposer.iterateFormatted
(FormattedText text, Style style, FormattedCharSink sink) -
Uses of Style in net.minecraft.world.damagesource
Fields in net.minecraft.world.damagesource declared as Style -
Uses of Style in net.minecraft.world.item
Fields in net.minecraft.world.item with type parameters of type StyleMethods in net.minecraft.world.item that return types with arguments of type StyleConstructor parameters in net.minecraft.world.item with type arguments of type StyleModifierConstructorDescriptionprivate
Rarity
(int id, String name, UnaryOperator<Style> styleModifier) -
Uses of Style in net.minecraft.world.item.armortrim
Methods in net.minecraft.world.item.armortrim with parameters of type StyleModifier and TypeMethodDescriptionprivate static void
TrimMaterials.register
(BootstrapContext<TrimMaterial> context, ResourceKey<TrimMaterial> materialKey, Item ingredient, Style style, float itemModelIndex) private static void
TrimMaterials.register
(BootstrapContext<TrimMaterial> context, ResourceKey<TrimMaterial> materialKey, Item ingredient, Style style, float itemModelIndex, Map<Holder<ArmorMaterial>, String> overrideArmorMaterials) -
Uses of Style in net.minecraft.world.item.component
Fields in net.minecraft.world.item.component declared as Style -
Uses of Style in net.minecraft.world.scores
Fields in net.minecraft.world.scores declared as Style -
Uses of Style in net.neoforged.neoforge.client.gui
Methods in net.neoforged.neoforge.client.gui that return StyleModifier and TypeMethodDescriptionprivate Style
ModListScreen.InfoPanel.findTextLine
(int mouseX, int mouseY) ModMismatchDisconnectedScreen.MismatchInfoPanel.getComponentStyleAt
(double x, double y) -
Uses of Style in net.neoforged.neoforge.common.util
Methods in net.neoforged.neoforge.common.util with parameters of type StyleModifier and TypeMethodDescription<T> Optional
<T> InsertingContents.visit
(FormattedText.StyledContentConsumer<T> visitor, Style style)