Class Style

java.lang.Object
net.minecraft.util.text.Style

public class Style extends Object
  • Field Details

    • EMPTY

      public static final Style EMPTY
    • DEFAULT_FONT

      public static final ResourceLocation DEFAULT_FONT
    • color

      @Nullable private final Color color
    • bold

      @Nullable private final Boolean bold
    • italic

      @Nullable private final Boolean italic
    • underlined

      @Nullable private final Boolean underlined
    • strikethrough

      @Nullable private final Boolean strikethrough
    • obfuscated

      @Nullable private final Boolean obfuscated
    • clickEvent

      @Nullable private final ClickEvent clickEvent
    • hoverEvent

      @Nullable private final HoverEvent hoverEvent
    • insertion

      @Nullable private final String insertion
    • font

      @Nullable private final ResourceLocation font
  • Constructor Details

  • Method Details

    • 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 String getInsertion()
    • getFont

      public ResourceLocation getFont()
    • withColor

      public Style withColor(@Nullable Color p_240718_1_)
    • withColor

      public Style withColor(@Nullable TextFormatting p_240712_1_)
    • withBold

      public Style withBold(@Nullable Boolean p_240713_1_)
    • withItalic

      public Style withItalic(@Nullable Boolean p_240722_1_)
    • withUnderlined

      public Style withUnderlined(@Nullable Boolean p_244282_1_)
    • setUnderlined

      public Style setUnderlined(@Nullable Boolean underlined)
    • setStrikethrough

      public Style setStrikethrough(@Nullable Boolean strikethrough)
    • setObfuscated

      public Style setObfuscated(@Nullable 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 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_)
    • applyTo

      public Style applyTo(Style p_240717_1_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object p_equals_1_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object