Class FoodStuffsStatsTab
java.lang.Object
io.github.thecsdev.betterstats.api.client.registry.StatsTab
io.github.thecsdev.betterstats.client.gui.stats.tabs.ItemStatsTab
io.github.thecsdev.betterstats.client.gui.stats.tabs.FoodStuffsStatsTab
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.thecsdev.betterstats.api.client.registry.StatsTab
StatsTab.FiltersInitContext, StatsTab.StatsInitContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final FilterGroupBy
Returns theFilterGroupBy
that'll be used by "default".final net.minecraft.text.Text
getName()
Returns the name of thisStatsTab
.
ThisText
will be rendered on the GUI to indicate the tab's name.protected final AtomicInteger
getPageFilter
(StatFilterSettings filters) Returns theAtomicInteger
that represents the "page" filter value.protected Predicate
<SUItemStat> getPredicate
(StatFilterSettings filterSettings) final void
initFilters
(StatsTab.FiltersInitContext initContext) Invoked when aStatFiltersPanel
GUI is initializing for a givenStatsTab
.protected void
initPageChooser
(StatsTab.StatsInitContext initContext, int totalItemCount, int itemsPerPage) Initializes aPageChooserPanel
.protected final void
processWidget
(ItemStatWidget widget) DefaultItemStatWidget
processing logic.
Primarily used forItemStatsTab.initStats(TPanelElement, Collection, Consumer)
.Methods inherited from class io.github.thecsdev.betterstats.client.gui.stats.tabs.ItemStatsTab
initExtraFilters, initStats, initStats
Methods inherited from class io.github.thecsdev.betterstats.api.client.registry.StatsTab
getId, isAvailable
-
Constructor Details
-
FoodStuffsStatsTab
public FoodStuffsStatsTab()
-
-
Method Details
-
getName
public final net.minecraft.text.Text getName()Description copied from class:StatsTab
Returns the name of thisStatsTab
.
ThisText
will be rendered on the GUI to indicate the tab's name.- Overrides:
getName
in classItemStatsTab
-
getDefaultGroupFilter
Description copied from class:ItemStatsTab
Returns theFilterGroupBy
that'll be used by "default".- Overrides:
getDefaultGroupFilter
in classItemStatsTab
-
processWidget
Description copied from class:ItemStatsTab
DefaultItemStatWidget
processing logic.
Primarily used forItemStatsTab.initStats(TPanelElement, Collection, Consumer)
.- Overrides:
processWidget
in classItemStatsTab
- Parameters:
widget
- TheItemStatWidget
.
-
getPredicate
-
initFilters
Description copied from class:StatsTab
Invoked when aStatFiltersPanel
GUI is initializing for a givenStatsTab
.Use this to initialize the
StatFilterSettings
GUI.- Overrides:
initFilters
in classStatsTab
- Parameters:
initContext
- TheStatsTab.FiltersInitContext
.
-
getPageFilter
Returns theAtomicInteger
that represents the "page" filter value.- Parameters:
filters
- TheStatFilterSettings
.
-
initPageChooser
protected void initPageChooser(StatsTab.StatsInitContext initContext, int totalItemCount, int itemsPerPage) Initializes aPageChooserPanel
.- Parameters:
initContext
- TheStatsTab.StatsInitContext
.totalItemCount
- The total number of items present.itemsPerPage
- The maximum number of items to be displayed per page.
-