Class StatsViewBlocks
java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.statsview.StatsView
com.thecsdev.betterstats.mcbs.view.statsview.SubjectStatsView<com.thecsdev.commonmc.api.stats.util.BlockStats>
com.thecsdev.betterstats.mcbs.view.statsview.StatsViewBlocks
- All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
@Environment(CLIENT)
@Internal
public final class StatsViewBlocks
extends SubjectStatsView<com.thecsdev.commonmc.api.stats.util.BlockStats>
StatsView that displays "Block" statistics.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTDropdownWidget.Entrys for groupingBlockStats.static final classTDropdownWidget.Entrys for sortingBlockStats.Nested classes/interfaces inherited from class StatsView
StatsView.Filters, StatsView.FiltersInitContext, StatsView.StatsInitContext -
Field Summary
FieldsFields inherited from class SubjectStatsView
OC_DONE, OC_INPROGRESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull net.minecraft.network.chat.ComponentReturns the display name of thisStatsView.
ThisComponentwill be shown on the GUI to indicate the view's name.protected final @NotNull Function<Iterable<com.thecsdev.commonmc.api.stats.util.BlockStats>, LinkedHashMap<net.minecraft.network.chat.Component, Iterable<com.thecsdev.commonmc.api.stats.util.BlockStats>>> getStatsGrouper(@NotNull StatsView.Filters filters) TheFunctionthat takes a collection ofSubjectStatsand groups them into aMapbased on theStatsView.Filters.protected @NotNull Comparator<com.thecsdev.commonmc.api.stats.util.BlockStats> getStatsSorter(@NotNull StatsView.Filters filters) final voidinitFilters(@NotNull StatsView.FiltersInitContext context) Invoked when aStatsView's filters GUI is initializing.final voidinitStats(@NotNull StatsView.StatsInitContext context) Invoked when theStatsView's statistics GUI is initializing.Methods inherited from class SubjectStatsView
getStatsPredicateMethods inherited from class StatsView
getDefault
-
Field Details
-
INSTANCE
The main instance of thisClass.
-
-
Constructor Details
-
StatsViewBlocks
public StatsViewBlocks()
-
-
Method Details
-
getDisplayName
@NotNull public final @NotNull net.minecraft.network.chat.Component getDisplayName()Description copied from class:StatsViewReturns 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- Specified by:
getDisplayNamein classStatsView
-
initFilters
Description copied from class:StatsViewInvoked when aStatsView's filters GUI is initializing.- Overrides:
initFiltersin classStatsView- Parameters:
context- TheStatsView.FiltersInitContext.
-
initStats
Description copied from class:StatsViewInvoked when theStatsView's statistics GUI is initializing.- Specified by:
initStatsin classStatsView- Parameters:
context- TheStatsView.StatsInitContext.
-
getStatsSorter
@Virtual @NotNull protected @NotNull Comparator<com.thecsdev.commonmc.api.stats.util.BlockStats> getStatsSorter(@NotNull @NotNull StatsView.Filters filters) throws NullPointerException Description copied from class:SubjectStatsView- Overrides:
getStatsSorterin classSubjectStatsView<com.thecsdev.commonmc.api.stats.util.BlockStats>- Parameters:
filters- TheStatsView.Filters.- Throws:
NullPointerException- If the argument isnull.
-
getStatsGrouper
@NotNull protected final @NotNull Function<Iterable<com.thecsdev.commonmc.api.stats.util.BlockStats>, LinkedHashMap<net.minecraft.network.chat.Component, Iterable<com.thecsdev.commonmc.api.stats.util.BlockStats>>> getStatsGrouper(@NotNull @NotNull StatsView.Filters filters) Description copied from class:SubjectStatsViewTheFunctionthat takes a collection ofSubjectStatsand groups them into aMapbased on theStatsView.Filters.- Overrides:
getStatsGrouperin classSubjectStatsView<com.thecsdev.commonmc.api.stats.util.BlockStats>- Parameters:
filters- TheStatsView.Filters.
-