All Implemented Interfaces:
TParentElement, ITooltipProvider, IEnableStateProvider, ITextProvider, ITextProviderSetter

public class TLabelElement extends TBlankElement implements ITextProviderSetter
  • Field Details

    • text

      @Nullable protected @Nullable net.minecraft.text.Text text
    • textHorizontalAlignment

      protected HorizontalAlignment textHorizontalAlignment
    • textColor

      protected int textColor
    • textSideOffset

      protected int textSideOffset
    • textScale

      protected float textScale
  • Constructor Details

    • TLabelElement

      public TLabelElement(int x, int y, int width, int height)
    • TLabelElement

      public TLabelElement(int x, int y, int width, int height, net.minecraft.text.Text text)
  • Method Details

    • getText

      public final net.minecraft.text.Text getText()
      Specified by:
      getText in interface ITextProvider
    • setText

      public void setText(net.minecraft.text.Text text)
      Specified by:
      setText in interface ITextProviderSetter
    • getTextHorizontalAlignment

      public final HorizontalAlignment getTextHorizontalAlignment()
    • setTextHorizontalAlignment

      public void setTextHorizontalAlignment(HorizontalAlignment alignment)
    • getTextColor

      public final int getTextColor()
    • setTextColor

      public void setTextColor(int color)
    • getTextSideOffset

      public final int getTextSideOffset()
    • setTextSideOffset

      public void setTextSideOffset(int textSideOffset)
    • getTextScale

      public final float getTextScale()
    • setTextScale

      public void setTextScale(float textScale)
    • render

      public void render(TDrawContext pencil)
      Description copied from interface: TParentElement
      Renders this GUI element on the screen.
      Specified by:
      render in interface TParentElement
      Overrides:
      render in class TBlankElement
      Parameters:
      pencil - The TDrawContext.