Class StatsView
java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.statsview.StatsView
- All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
- Direct Known Subclasses:
StatsViewGoals, SubjectStatsView
@Environment(CLIENT)
public abstract class StatsView
extends Object
implements com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
Represents a 'view' within an
McbsEditorTab of an McbsEditorGUI.
Each view is responsible for displaying a specific category of statistics, such
as general stats, item-related stats, or mob-related stats.
This abstract Class serves as a blueprint for creating different types
of statistics views. It is the primary thing responsible for constructing GUI
interfaces for statistics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGenericPropertiesimplementation that holds "Filters" configuration that is used to filter statistics displayed withStatsView.StatsInitContexts.static interfaceThe initialization context for when aStatsView's "stat filters" GUI is initializing.static interfaceThe initialization context for when aStatsView's "statistics" GUI is initializing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final @NotNull StatsViewReturns theStatsViewinstance that is used by default, usually as the introductory view that is open when anMcbsEditorTabtab is opened for its first time.abstract @NotNull net.minecraft.network.chat.ComponentReturns the display name of thisStatsView.
ThisComponentwill be shown on the GUI to indicate the view's name.voidinitFilters(@NotNull StatsView.FiltersInitContext context) Invoked when aStatsView's filters GUI is initializing.abstract voidinitStats(@NotNull StatsView.StatsInitContext context) Invoked when theStatsView's statistics GUI is initializing.
-
Constructor Details
-
StatsView
public StatsView()
-
-
Method Details
-
getDefault
Returns theStatsViewinstance that is used by default, usually as the introductory view that is open when anMcbsEditorTabtab is opened for its first time. -
getDisplayName
@NotNull public abstract @NotNull net.minecraft.network.chat.Component getDisplayName()Returns the display name of thisStatsView.
ThisComponentwill be shown on the GUI to indicate the view's name.- Specified by:
getDisplayNamein interfacecom.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
-
initFilters
Invoked when aStatsView's filters GUI is initializing.- Parameters:
context- TheStatsView.FiltersInitContext.
-
initStats
Invoked when theStatsView's statistics GUI is initializing.- Parameters:
context- TheStatsView.StatsInitContext.
-