Class Text


public class Text extends UIElement<Text>
A text element that renders a string with configurable color, shadow, padding, and formatting (bold, italic, underline, strikethrough, obfuscated). Formatting uses tri-state Boolean: null = inherit, true = on, false = off.
  • Constructor Details

    • Text

      public Text(String text)
  • Method Details

    • text

      public Text text(String text)
    • color

      public Text color(int color)
    • shadow

      public Text shadow(boolean shadow)
    • bold

      public Text bold()
    • bold

      public Text bold(boolean v)
    • italic

      public Text italic()
    • italic

      public Text italic(boolean v)
    • underline

      public Text underline()
    • underline

      public Text underline(boolean v)
    • strikethrough

      public Text strikethrough()
    • strikethrough

      public Text strikethrough(boolean v)
    • obfuscated

      public Text obfuscated()
    • obfuscated

      public Text obfuscated(boolean v)
    • getText

      public String getText()
    • measure

      public void measure(net.minecraft.client.gui.Font font)
      Description copied from class: UIElement
      Measure this element's intrinsic size. After calling, computedWidth and computedHeight are set.
      Specified by:
      measure in class UIElement<Text>
    • render

      public void render(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font)
      Description copied from class: UIElement
      Render this element using its computed layout coordinates.
      Specified by:
      render in class UIElement<Text>