类 Style
- java.lang.Object
-
- net.minecraft.text.Style
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classStyle.SerializerA JSON serializer forStyle.
-
字段概要
字段 修饰符和类型 字段 说明 private @Nullable Booleanboldprivate @Nullable ClickEventclickEventprivate @Nullable TextColorcolorstatic IdentifierDEFAULT_FONT_IDThe identifier for the default font of a style.static StyleEMPTYAn empty style.private @Nullable Identifierfontprivate @Nullable HoverEventhoverEventprivate @Nullable Stringinsertionprivate @Nullable Booleanitalicprivate @Nullable Booleanobfuscatedprivate @Nullable Booleanstrikethroughprivate @Nullable Booleanunderlined
-
构造器概要
构造器 限定符 构造器 说明 privateStyle(@Nullable TextColor color, @Nullable Boolean bold, @Nullable Boolean italic, @Nullable Boolean underlined, @Nullable Boolean strikethrough, @Nullable Boolean obfuscated, @Nullable ClickEvent clickEvent, @Nullable HoverEvent hoverEvent, @Nullable String insertion, @Nullable Identifier font)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object obj)@Nullable ClickEventgetClickEvent()Returns the click event of this style.@Nullable TextColorgetColor()Returns the color of this style.IdentifiergetFont()Returns the font of this style.@Nullable HoverEventgetHoverEvent()Returns the hover event of this style.@Nullable StringgetInsertion()Returns the insertion text of the style.inthashCode()booleanisBold()Returns whether the style has bold formatting.booleanisEmpty()Returns if this is the empty style.booleanisItalic()Returns whether the style has italic formatting.booleanisObfuscated()Returns whether the style has obfuscated formatting.booleanisStrikethrough()Returns whether the style has strikethrough formatting.booleanisUnderlined()Returns whether the style has underline formatting.Styleobfuscated(@Nullable Boolean obfuscated)StringtoString()StylewithBold(@Nullable Boolean bold)Returns a new style with the bold attribute provided and all other attributes of this style.StylewithClickEvent(@Nullable ClickEvent clickEvent)Returns a new style with the click event provided and all other attributes of this style.StylewithColor(int rgbColor)StylewithColor(@Nullable TextColor color)Returns a new style with the color provided and all other attributes of this style.StylewithColor(@Nullable Formatting color)Returns a new style with the color provided and all other attributes of this style.StylewithExclusiveFormatting(Formatting formatting)Returns a new style with the formatting provided and some applicable attributes of this style.StylewithFont(@Nullable Identifier font)Returns a new style with the font provided and all other attributes of this style.StylewithFormatting(Formatting formatting)Returns a new style with the formatting provided and all other attributes of this style.StylewithFormatting(Formatting[] formattings)Returns a new style with the formattings provided and all other attributes of this style.StylewithHoverEvent(@Nullable HoverEvent hoverEvent)Returns a new style with the hover event provided and all other attributes of this style.StylewithInsertion(@Nullable String insertion)Returns a new style with the insertion provided and all other attributes of this style.StylewithItalic(@Nullable Boolean italic)Returns a new style with the italic attribute provided and all other attributes of this style.StylewithParent(Style parent)Returns a new style with the undefined attributes of this style filled by theparentstyle.StylewithStrikethrough(@Nullable Boolean strikethrough)StylewithUnderline(@Nullable Boolean underline)Returns a new style with the underline attribute provided and all other attributes of this style.
-
-
-
字段详细资料
-
EMPTY
public static final Style EMPTY
An empty style.- Mappings:
Namespace Name Mixin selector official aLox;a:Lox;intermediary field_24360Lnet/minecraft/class_2583;field_24360:Lnet/minecraft/class_2583;named EMPTYLnet/minecraft/text/Style;EMPTY:Lnet/minecraft/text/Style;
-
DEFAULT_FONT_ID
public static final Identifier DEFAULT_FONT_ID
The identifier for the default font of a style.- Mappings:
Namespace Name Mixin selector official bLox;b:Lwp;intermediary field_24359Lnet/minecraft/class_2583;field_24359:Lnet/minecraft/class_2960;named DEFAULT_FONT_IDLnet/minecraft/text/Style;DEFAULT_FONT_ID:Lnet/minecraft/util/Identifier;
-
color
@Nullable private final @Nullable TextColor color
- Mappings:
Namespace Name Mixin selector official cLox;c:Loz;intermediary field_11855Lnet/minecraft/class_2583;field_11855:Lnet/minecraft/class_5251;named colorLnet/minecraft/text/Style;color:Lnet/minecraft/text/TextColor;
-
bold
@Nullable private final @Nullable Boolean bold
- Mappings:
Namespace Name Mixin selector official dLox;d:Ljava/lang/Boolean;intermediary field_11856Lnet/minecraft/class_2583;field_11856:Ljava/lang/Boolean;named boldLnet/minecraft/text/Style;bold:Ljava/lang/Boolean;
-
italic
@Nullable private final @Nullable Boolean italic
- Mappings:
Namespace Name Mixin selector official eLox;e:Ljava/lang/Boolean;intermediary field_11852Lnet/minecraft/class_2583;field_11852:Ljava/lang/Boolean;named italicLnet/minecraft/text/Style;italic:Ljava/lang/Boolean;
-
underlined
@Nullable private final @Nullable Boolean underlined
- Mappings:
Namespace Name Mixin selector official fLox;f:Ljava/lang/Boolean;intermediary field_11851Lnet/minecraft/class_2583;field_11851:Ljava/lang/Boolean;named underlinedLnet/minecraft/text/Style;underlined:Ljava/lang/Boolean;
-
strikethrough
@Nullable private final @Nullable Boolean strikethrough
- Mappings:
Namespace Name Mixin selector official gLox;g:Ljava/lang/Boolean;intermediary field_11857Lnet/minecraft/class_2583;field_11857:Ljava/lang/Boolean;named strikethroughLnet/minecraft/text/Style;strikethrough:Ljava/lang/Boolean;
-
obfuscated
@Nullable private final @Nullable Boolean obfuscated
- Mappings:
Namespace Name Mixin selector official hLox;h:Ljava/lang/Boolean;intermediary field_11861Lnet/minecraft/class_2583;field_11861:Ljava/lang/Boolean;named obfuscatedLnet/minecraft/text/Style;obfuscated:Ljava/lang/Boolean;
-
clickEvent
@Nullable private final @Nullable ClickEvent clickEvent
- Mappings:
Namespace Name Mixin selector official iLox;i:Lol;intermediary field_11853Lnet/minecraft/class_2583;field_11853:Lnet/minecraft/class_2558;named clickEventLnet/minecraft/text/Style;clickEvent:Lnet/minecraft/text/ClickEvent;
-
hoverEvent
@Nullable private final @Nullable HoverEvent hoverEvent
- Mappings:
Namespace Name Mixin selector official jLox;j:Lor;intermediary field_11858Lnet/minecraft/class_2583;field_11858:Lnet/minecraft/class_2568;named hoverEventLnet/minecraft/text/Style;hoverEvent:Lnet/minecraft/text/HoverEvent;
-
insertion
@Nullable private final @Nullable String insertion
- Mappings:
Namespace Name Mixin selector official kLox;k:Ljava/lang/String;intermediary field_11859Lnet/minecraft/class_2583;field_11859:Ljava/lang/String;named insertionLnet/minecraft/text/Style;insertion:Ljava/lang/String;
-
font
@Nullable private final @Nullable Identifier font
- Mappings:
Namespace Name Mixin selector official lLox;l:Lwp;intermediary field_24361Lnet/minecraft/class_2583;field_24361:Lnet/minecraft/class_2960;named fontLnet/minecraft/text/Style;font:Lnet/minecraft/util/Identifier;
-
-
构造器详细资料
-
Style
private Style(@Nullable @Nullable TextColor color, @Nullable @Nullable Boolean bold, @Nullable @Nullable Boolean italic, @Nullable @Nullable Boolean underlined, @Nullable @Nullable Boolean strikethrough, @Nullable @Nullable Boolean obfuscated, @Nullable @Nullable ClickEvent clickEvent, @Nullable @Nullable HoverEvent hoverEvent, @Nullable @Nullable String insertion, @Nullable @Nullable Identifier font)
- Mappings:
Namespace Name Mixin selector official <init>Lox;<init>(Loz;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lol;Lor;Ljava/lang/String;Lwp;)Vintermediary <init>Lnet/minecraft/class_2583;<init>(Lnet/minecraft/class_5251;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/class_2558;Lnet/minecraft/class_2568;Ljava/lang/String;Lnet/minecraft/class_2960;)Vnamed <init>Lnet/minecraft/text/Style;<init>(Lnet/minecraft/text/TextColor;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/text/ClickEvent;Lnet/minecraft/text/HoverEvent;Ljava/lang/String;Lnet/minecraft/util/Identifier;)V
-
-
方法详细资料
-
getColor
@Nullable public @Nullable TextColor getColor()
Returns the color of this style.- Mappings:
Namespace Name Mixin selector official aLox;a()Loz;intermediary method_10973Lnet/minecraft/class_2583;method_10973()Lnet/minecraft/class_5251;named getColorLnet/minecraft/text/Style;getColor()Lnet/minecraft/text/TextColor;
-
isBold
public boolean isBold()
Returns whether the style has bold formatting.- 另请参阅:
Formatting.BOLD- Mappings:
Namespace Name Mixin selector official bLox;b()Zintermediary method_10984Lnet/minecraft/class_2583;method_10984()Znamed isBoldLnet/minecraft/text/Style;isBold()Z
-
isItalic
public boolean isItalic()
Returns whether the style has italic formatting.- 另请参阅:
Formatting.ITALIC- Mappings:
Namespace Name Mixin selector official cLox;c()Zintermediary method_10966Lnet/minecraft/class_2583;method_10966()Znamed isItalicLnet/minecraft/text/Style;isItalic()Z
-
isStrikethrough
public boolean isStrikethrough()
Returns whether the style has strikethrough formatting.- 另请参阅:
Formatting.STRIKETHROUGH- Mappings:
Namespace Name Mixin selector official dLox;d()Zintermediary method_10986Lnet/minecraft/class_2583;method_10986()Znamed isStrikethroughLnet/minecraft/text/Style;isStrikethrough()Z
-
isUnderlined
public boolean isUnderlined()
Returns whether the style has underline formatting.- 另请参阅:
Formatting.UNDERLINE- Mappings:
Namespace Name Mixin selector official eLox;e()Zintermediary method_10965Lnet/minecraft/class_2583;method_10965()Znamed isUnderlinedLnet/minecraft/text/Style;isUnderlined()Z
-
isObfuscated
public boolean isObfuscated()
Returns whether the style has obfuscated formatting.- 另请参阅:
Formatting.OBFUSCATED- Mappings:
Namespace Name Mixin selector official fLox;f()Zintermediary method_10987Lnet/minecraft/class_2583;method_10987()Znamed isObfuscatedLnet/minecraft/text/Style;isObfuscated()Z
-
isEmpty
public boolean isEmpty()
Returns if this is the empty style.- 另请参阅:
EMPTY- Mappings:
Namespace Name Mixin selector official gLox;g()Zintermediary method_10967Lnet/minecraft/class_2583;method_10967()Znamed isEmptyLnet/minecraft/text/Style;isEmpty()Z
-
getClickEvent
@Nullable public @Nullable ClickEvent getClickEvent()
Returns the click event of this style.- Mappings:
Namespace Name Mixin selector official hLox;h()Lol;intermediary method_10970Lnet/minecraft/class_2583;method_10970()Lnet/minecraft/class_2558;named getClickEventLnet/minecraft/text/Style;getClickEvent()Lnet/minecraft/text/ClickEvent;
-
getHoverEvent
@Nullable public @Nullable HoverEvent getHoverEvent()
Returns the hover event of this style.- Mappings:
Namespace Name Mixin selector official iLox;i()Lor;intermediary method_10969Lnet/minecraft/class_2583;method_10969()Lnet/minecraft/class_2568;named getHoverEventLnet/minecraft/text/Style;getHoverEvent()Lnet/minecraft/text/HoverEvent;
-
getInsertion
@Nullable public @Nullable String getInsertion()
Returns the insertion text of the style.An insertion is inserted when a piece of text clicked while shift key is down in the chat HUD.
- Mappings:
Namespace Name Mixin selector official jLox;j()Ljava/lang/String;intermediary method_10955Lnet/minecraft/class_2583;method_10955()Ljava/lang/String;named getInsertionLnet/minecraft/text/Style;getInsertion()Ljava/lang/String;
-
getFont
public Identifier getFont()
Returns the font of this style.- Mappings:
Namespace Name Mixin selector official kLox;k()Lwp;intermediary method_27708Lnet/minecraft/class_2583;method_27708()Lnet/minecraft/class_2960;named getFontLnet/minecraft/text/Style;getFont()Lnet/minecraft/util/Identifier;
-
withColor
public Style withColor(@Nullable @Nullable TextColor color)
Returns a new style with the color provided and all other attributes of this style.- 参数:
color- the new color- Mappings:
Namespace Name Mixin selector official aLox;a(Loz;)Lox;intermediary method_27703Lnet/minecraft/class_2583;method_27703(Lnet/minecraft/class_5251;)Lnet/minecraft/class_2583;named withColorLnet/minecraft/text/Style;withColor(Lnet/minecraft/text/TextColor;)Lnet/minecraft/text/Style;
-
withColor
public Style withColor(@Nullable @Nullable Formatting color)
Returns a new style with the color provided and all other attributes of this style.- 参数:
color- the new color- Mappings:
Namespace Name Mixin selector official aLox;a(Lp;)Lox;intermediary method_10977Lnet/minecraft/class_2583;method_10977(Lnet/minecraft/class_124;)Lnet/minecraft/class_2583;named withColorLnet/minecraft/text/Style;withColor(Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/Style;
-
withColor
public Style withColor(int rgbColor)
- Mappings:
Namespace Name Mixin selector official aLox;a(I)Lox;intermediary method_36139Lnet/minecraft/class_2583;method_36139(I)Lnet/minecraft/class_2583;named withColorLnet/minecraft/text/Style;withColor(I)Lnet/minecraft/text/Style;
-
withBold
public Style withBold(@Nullable @Nullable Boolean bold)
Returns a new style with the bold attribute provided and all other attributes of this style.- 参数:
bold- the new bold property- Mappings:
Namespace Name Mixin selector official aLox;a(Ljava/lang/Boolean;)Lox;intermediary method_10982Lnet/minecraft/class_2583;method_10982(Ljava/lang/Boolean;)Lnet/minecraft/class_2583;named withBoldLnet/minecraft/text/Style;withBold(Ljava/lang/Boolean;)Lnet/minecraft/text/Style;
-
withItalic
public Style withItalic(@Nullable @Nullable Boolean italic)
Returns a new style with the italic attribute provided and all other attributes of this style.- 参数:
italic- the new italic property- Mappings:
Namespace Name Mixin selector official bLox;b(Ljava/lang/Boolean;)Lox;intermediary method_10978Lnet/minecraft/class_2583;method_10978(Ljava/lang/Boolean;)Lnet/minecraft/class_2583;named withItalicLnet/minecraft/text/Style;withItalic(Ljava/lang/Boolean;)Lnet/minecraft/text/Style;
-
withUnderline
public Style withUnderline(@Nullable @Nullable Boolean underline)
Returns a new style with the underline attribute provided and all other attributes of this style.- Mappings:
Namespace Name Mixin selector official cLox;c(Ljava/lang/Boolean;)Lox;intermediary method_30938Lnet/minecraft/class_2583;method_30938(Ljava/lang/Boolean;)Lnet/minecraft/class_2583;named withUnderlineLnet/minecraft/text/Style;withUnderline(Ljava/lang/Boolean;)Lnet/minecraft/text/Style;
-
withStrikethrough
public Style withStrikethrough(@Nullable @Nullable Boolean strikethrough)
- Mappings:
Namespace Name Mixin selector official dLox;d(Ljava/lang/Boolean;)Lox;intermediary method_36140Lnet/minecraft/class_2583;method_36140(Ljava/lang/Boolean;)Lnet/minecraft/class_2583;named withStrikethroughLnet/minecraft/text/Style;withStrikethrough(Ljava/lang/Boolean;)Lnet/minecraft/text/Style;
-
obfuscated
public Style obfuscated(@Nullable @Nullable Boolean obfuscated)
- Mappings:
Namespace Name Mixin selector official eLox;e(Ljava/lang/Boolean;)Lox;intermediary method_36141Lnet/minecraft/class_2583;method_36141(Ljava/lang/Boolean;)Lnet/minecraft/class_2583;named obfuscatedLnet/minecraft/text/Style;obfuscated(Ljava/lang/Boolean;)Lnet/minecraft/text/Style;
-
withClickEvent
public Style withClickEvent(@Nullable @Nullable ClickEvent clickEvent)
Returns a new style with the click event provided and all other attributes of this style.- 参数:
clickEvent- the new click event- Mappings:
Namespace Name Mixin selector official aLox;a(Lol;)Lox;intermediary method_10958Lnet/minecraft/class_2583;method_10958(Lnet/minecraft/class_2558;)Lnet/minecraft/class_2583;named withClickEventLnet/minecraft/text/Style;withClickEvent(Lnet/minecraft/text/ClickEvent;)Lnet/minecraft/text/Style;
-
withHoverEvent
public Style withHoverEvent(@Nullable @Nullable HoverEvent hoverEvent)
Returns a new style with the hover event provided and all other attributes of this style.- 参数:
hoverEvent- the new hover event- Mappings:
Namespace Name Mixin selector official aLox;a(Lor;)Lox;intermediary method_10949Lnet/minecraft/class_2583;method_10949(Lnet/minecraft/class_2568;)Lnet/minecraft/class_2583;named withHoverEventLnet/minecraft/text/Style;withHoverEvent(Lnet/minecraft/text/HoverEvent;)Lnet/minecraft/text/Style;
-
withInsertion
public Style withInsertion(@Nullable @Nullable String insertion)
Returns a new style with the insertion provided and all other attributes of this style.- 参数:
insertion- the new insertion string- Mappings:
Namespace Name Mixin selector official aLox;a(Ljava/lang/String;)Lox;intermediary method_10975Lnet/minecraft/class_2583;method_10975(Ljava/lang/String;)Lnet/minecraft/class_2583;named withInsertionLnet/minecraft/text/Style;withInsertion(Ljava/lang/String;)Lnet/minecraft/text/Style;
-
withFont
public Style withFont(@Nullable @Nullable Identifier font)
Returns a new style with the font provided and all other attributes of this style.- 参数:
font- the new font- Mappings:
Namespace Name Mixin selector official aLox;a(Lwp;)Lox;intermediary method_27704Lnet/minecraft/class_2583;method_27704(Lnet/minecraft/class_2960;)Lnet/minecraft/class_2583;named withFontLnet/minecraft/text/Style;withFont(Lnet/minecraft/util/Identifier;)Lnet/minecraft/text/Style;
-
withFormatting
public Style withFormatting(Formatting formatting)
Returns a new style with the formatting provided and all other attributes of this style.- 参数:
formatting- the new formatting- Mappings:
Namespace Name Mixin selector official bLox;b(Lp;)Lox;intermediary method_27706Lnet/minecraft/class_2583;method_27706(Lnet/minecraft/class_124;)Lnet/minecraft/class_2583;named withFormattingLnet/minecraft/text/Style;withFormatting(Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/Style;
-
withExclusiveFormatting
public Style withExclusiveFormatting(Formatting formatting)
Returns a new style with the formatting provided and some applicable attributes of this style.When a color formatting is passed for
formatting, the other formattings, including bold, italic, strikethrough, underlined, and obfuscated, are all removed.- 参数:
formatting- the new formatting- Mappings:
Namespace Name Mixin selector official cLox;c(Lp;)Lox;intermediary method_27707Lnet/minecraft/class_2583;method_27707(Lnet/minecraft/class_124;)Lnet/minecraft/class_2583;named withExclusiveFormattingLnet/minecraft/text/Style;withExclusiveFormatting(Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/Style;
-
withFormatting
public Style withFormatting(Formatting[] formattings)
Returns a new style with the formattings provided and all other attributes of this style.- 参数:
formattings- an array of new formattings- Mappings:
Namespace Name Mixin selector official aLox;a([Lp;)Lox;intermediary method_27705Lnet/minecraft/class_2583;method_27705([Lnet/minecraft/class_124;)Lnet/minecraft/class_2583;named withFormattingLnet/minecraft/text/Style;withFormatting([Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/Style;
-
withParent
public Style withParent(Style parent)
Returns a new style with the undefined attributes of this style filled by theparentstyle.- 参数:
parent- the parent style- Mappings:
Namespace Name Mixin selector official aLox;a(Lox;)Lox;intermediary method_27702Lnet/minecraft/class_2583;method_27702(Lnet/minecraft/class_2583;)Lnet/minecraft/class_2583;named withParentLnet/minecraft/text/Style;withParent(Lnet/minecraft/text/Style;)Lnet/minecraft/text/Style;
-
toString
public String toString()
-
equals
public boolean equals(Object obj)
-
-