Class AbstractSectionWithTitle<T extends AbstractSectionWithTitle<T>>

java.lang.Object
net.mcexpanded.fancytabsections.Section.AbstractSectionWithTitle<T>
All Implemented Interfaces:
Section<T>, StickySection
Direct Known Subclasses:
SectionColored, SectionTextured

public abstract class AbstractSectionWithTitle<T extends AbstractSectionWithTitle<T>> extends Object implements Section<T>, StickySection
Since:
4.0
  • Field Details

    • title

      public net.minecraft.network.chat.Component title
    • titleOffsetX

      public int titleOffsetX
    • titleOffsetY

      public int titleOffsetY
    • textColor

      public int textColor
    • textOutline

      public int textOutline
    • textShadow

      public boolean textShadow
  • Constructor Details

    • AbstractSectionWithTitle

      public AbstractSectionWithTitle(net.minecraft.resources.Identifier id)
  • Method Details

    • render

      public void render(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY)
      Specified by:
      render in interface Section<T extends AbstractSectionWithTitle<T>>
    • renderTitle

      public void renderTitle(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY)
    • setTitle

      public T setTitle(net.minecraft.network.chat.Component component)
    • setTitle

      public T setTitle(String title)
    • setTitleOffset

      public T setTitleOffset(int x, int y)
      Adjusts the offset at which to render the Title. Default is (5, 5)
      Since:
      4.0
    • setCentered

      public T setCentered(boolean centered)
      Makes the title of the section centered in the middle + offset
      Since:
      5.0
    • setTextColor

      public T setTextColor(int textColor)
    • setTextOutline

      public T setTextOutline(int textOutline)
    • setTextShadow

      public T setTextShadow(boolean textShadow)
    • setCollapsible

      public T setCollapsible(boolean collapsible)
    • setItems

      public T setItems(ConglomerateOfItems items)
    • setSticky

      public T setSticky(boolean sticky)
      Adjusts the offset at which to render the Title. Default is (5, 5)
      Since:
      5.0
    • setOnRender

      public T setOnRender(Runnable onRender)
      Runs code each time Section.render(GuiGraphicsExtractor, Font, int, int) is called for this Section.
      Since:
      5.0
    • id

      public net.minecraft.resources.Identifier id()
      Specified by:
      id in interface Section<T extends AbstractSectionWithTitle<T>>
    • items

      public ConglomerateOfItems items()
      Specified by:
      items in interface Section<T extends AbstractSectionWithTitle<T>>
    • collapsible

      public boolean collapsible()
      Specified by:
      collapsible in interface Section<T extends AbstractSectionWithTitle<T>>
    • isSticky

      public boolean isSticky()
      Specified by:
      isSticky in interface StickySection