Package net.minecraft.util.text
Class Style
- java.lang.Object
-
- net.minecraft.util.text.Style
-
public class Style extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Style.Serializer
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Boolean
bold
private ClickEvent
clickEvent
private Color
color
static ResourceLocation
DEFAULT_FONT
static Style
EMPTY
private ResourceLocation
font
private HoverEvent
hoverEvent
private java.lang.String
insertion
private java.lang.Boolean
italic
private java.lang.Boolean
obfuscated
private java.lang.Boolean
strikethrough
private java.lang.Boolean
underlined
-
Constructor Summary
Constructors Modifier Constructor Description private
Style(Color p_i232570_1_, java.lang.Boolean p_i232570_2_, java.lang.Boolean p_i232570_3_, java.lang.Boolean p_i232570_4_, java.lang.Boolean p_i232570_5_, java.lang.Boolean p_i232570_6_, ClickEvent p_i232570_7_, HoverEvent p_i232570_8_, java.lang.String p_i232570_9_, ResourceLocation p_i232570_10_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Style
applyFormat(TextFormatting p_240721_1_)
Style
applyFormats(TextFormatting... p_240720_1_)
Style
applyLegacyFormat(TextFormatting p_240723_1_)
Style
applyTo(Style p_240717_1_)
boolean
equals(java.lang.Object p_equals_1_)
ClickEvent
getClickEvent()
Color
getColor()
ResourceLocation
getFont()
HoverEvent
getHoverEvent()
java.lang.String
getInsertion()
int
hashCode()
boolean
isBold()
boolean
isEmpty()
boolean
isItalic()
boolean
isObfuscated()
boolean
isStrikethrough()
boolean
isUnderlined()
Style
setObfuscated(java.lang.Boolean obfuscated)
Style
setStrikethrough(java.lang.Boolean strikethrough)
Style
setUnderlined(java.lang.Boolean underlined)
java.lang.String
toString()
Style
withBold(java.lang.Boolean p_240713_1_)
Style
withClickEvent(ClickEvent p_240715_1_)
Style
withColor(Color p_240718_1_)
Style
withColor(TextFormatting p_240712_1_)
Style
withFont(ResourceLocation p_240719_1_)
Style
withHoverEvent(HoverEvent p_240716_1_)
Style
withInsertion(java.lang.String p_240714_1_)
Style
withItalic(java.lang.Boolean p_240722_1_)
Style
withUnderlined(java.lang.Boolean p_244282_1_)
-
-
-
Field Detail
-
EMPTY
public static final Style EMPTY
-
DEFAULT_FONT
public static final ResourceLocation DEFAULT_FONT
-
color
@Nullable private final Color color
-
bold
@Nullable private final java.lang.Boolean bold
-
italic
@Nullable private final java.lang.Boolean italic
-
underlined
@Nullable private final java.lang.Boolean underlined
-
strikethrough
@Nullable private final java.lang.Boolean strikethrough
-
obfuscated
@Nullable private final java.lang.Boolean obfuscated
-
clickEvent
@Nullable private final ClickEvent clickEvent
-
hoverEvent
@Nullable private final HoverEvent hoverEvent
-
insertion
@Nullable private final java.lang.String insertion
-
font
@Nullable private final ResourceLocation font
-
-
Constructor Detail
-
Style
private Style(@Nullable Color p_i232570_1_, @Nullable java.lang.Boolean p_i232570_2_, @Nullable java.lang.Boolean p_i232570_3_, @Nullable java.lang.Boolean p_i232570_4_, @Nullable java.lang.Boolean p_i232570_5_, @Nullable java.lang.Boolean p_i232570_6_, @Nullable ClickEvent p_i232570_7_, @Nullable HoverEvent p_i232570_8_, @Nullable java.lang.String p_i232570_9_, @Nullable ResourceLocation p_i232570_10_)
-
-
Method Detail
-
getColor
@Nullable public Color getColor()
-
isBold
public boolean isBold()
-
isItalic
public boolean isItalic()
-
isStrikethrough
public boolean isStrikethrough()
-
isUnderlined
public boolean isUnderlined()
-
isObfuscated
public boolean isObfuscated()
-
isEmpty
public boolean isEmpty()
-
getClickEvent
@Nullable public ClickEvent getClickEvent()
-
getHoverEvent
@Nullable public HoverEvent getHoverEvent()
-
getInsertion
@Nullable public java.lang.String getInsertion()
-
getFont
public ResourceLocation getFont()
-
withColor
public Style withColor(@Nullable TextFormatting p_240712_1_)
-
withBold
public Style withBold(@Nullable java.lang.Boolean p_240713_1_)
-
withItalic
public Style withItalic(@Nullable java.lang.Boolean p_240722_1_)
-
withUnderlined
public Style withUnderlined(@Nullable java.lang.Boolean p_244282_1_)
-
setUnderlined
public Style setUnderlined(@Nullable java.lang.Boolean underlined)
-
setStrikethrough
public Style setStrikethrough(@Nullable java.lang.Boolean strikethrough)
-
setObfuscated
public Style setObfuscated(@Nullable java.lang.Boolean obfuscated)
-
withClickEvent
public Style withClickEvent(@Nullable ClickEvent p_240715_1_)
-
withHoverEvent
public Style withHoverEvent(@Nullable HoverEvent p_240716_1_)
-
withInsertion
public Style withInsertion(@Nullable java.lang.String p_240714_1_)
-
withFont
public Style withFont(@Nullable ResourceLocation p_240719_1_)
-
applyFormat
public Style applyFormat(TextFormatting p_240721_1_)
-
applyLegacyFormat
public Style applyLegacyFormat(TextFormatting p_240723_1_)
-
applyFormats
public Style applyFormats(TextFormatting... p_240720_1_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-