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 Summary
FieldsModifier and TypeFieldDescriptionintintbooleannet.minecraft.network.chat.Componentintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.minecraft.resources.Identifierid()booleanisSticky()items()voidrender(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) voidrenderTitle(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) setCentered(boolean centered) Makes the title of the section centered in the middle + offsetsetCollapsible(boolean collapsible) setItems(ConglomerateOfItems items) setOnRender(Runnable onRender) Runs code each timeSection.render(GuiGraphicsExtractor, Font, int, int)is called for this Section.setSticky(boolean sticky) Adjusts the offset at which to render the Title.setTextColor(int textColor) setTextOutline(int textOutline) setTextShadow(boolean textShadow) setTitle(net.minecraft.network.chat.Component component) setTitleOffset(int x, int y) Adjusts the offset at which to render the Title.
-
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:
renderin interfaceSection<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
-
setTitle
-
setTitleOffset
Adjusts the offset at which to render the Title. Default is (5, 5)- Since:
- 4.0
-
setCentered
Makes the title of the section centered in the middle + offset- Since:
- 5.0
-
setTextColor
-
setTextOutline
-
setTextShadow
-
setCollapsible
-
setItems
-
setSticky
Adjusts the offset at which to render the Title. Default is (5, 5)- Since:
- 5.0
-
setOnRender
Runs code each timeSection.render(GuiGraphicsExtractor, Font, int, int)is called for this Section.- Since:
- 5.0
-
id
public net.minecraft.resources.Identifier id()- Specified by:
idin interfaceSection<T extends AbstractSectionWithTitle<T>>
-
items
- Specified by:
itemsin interfaceSection<T extends AbstractSectionWithTitle<T>>
-
collapsible
public boolean collapsible()- Specified by:
collapsiblein interfaceSection<T extends AbstractSectionWithTitle<T>>
-
isSticky
public boolean isSticky()- Specified by:
isStickyin interfaceStickySection
-