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.

  • Constructor Details

    • StatsView

      public StatsView()
  • Method Details

    • getDefault

      @NotNull public static final @NotNull StatsView getDefault()
      Returns the StatsView instance that is used by default, usually as the introductory view that is open when an McbsEditorTab tab is opened for its first time.
    • getDisplayName

      @NotNull public abstract @NotNull net.minecraft.network.chat.Component getDisplayName()
      Returns the display name of this StatsView.
      This Component will be shown on the GUI to indicate the view's name.
      Specified by:
      getDisplayName in interface com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
    • initFilters

      @Virtual public void initFilters(@NotNull @NotNull StatsView.FiltersInitContext context)
      Invoked when a StatsView's filters GUI is initializing.
      Parameters:
      context - The StatsView.FiltersInitContext.
    • initStats

      public abstract void initStats(@NotNull @NotNull StatsView.StatsInitContext context)
      Invoked when the StatsView's statistics GUI is initializing.
      Parameters:
      context - The StatsView.StatsInitContext.