Class SubjectStatsView<SS extends com.thecsdev.commonmc.api.stats.util.SubjectStats<?>>
java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.statsview.StatsView
com.thecsdev.betterstats.mcbs.view.statsview.SubjectStatsView<SS>
- All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
- Direct Known Subclasses:
StatsViewBlocks, StatsViewGeneral, StatsViewItems, StatsViewMobs
@Environment(CLIENT)
@Internal
public abstract sealed class SubjectStatsView<SS extends com.thecsdev.commonmc.api.stats.util.SubjectStats<?>>
extends StatsView
permits StatsViewBlocks, StatsViewGeneral, StatsViewItems, StatsViewMobs
-
Nested Class Summary
Nested classes/interfaces inherited from class StatsView
StatsView.Filters, StatsView.FiltersInitContext, StatsView.StatsInitContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAnIntegercorresponding to the outline color that is to be used for statistics widgets that are considered "complete", usually for advancement progress tracking (ex.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull Function<Iterable<SS>, LinkedHashMap<net.minecraft.network.chat.Component, Iterable<SS>>> getStatsGrouper(StatsView.Filters filters) TheFunctionthat takes a collection ofSubjectStatsand groups them into aMapbased on theStatsView.Filters.getStatsPredicate(StatsView.Filters filters) protected @NotNull Comparator<SS> getStatsSorter(StatsView.Filters filters) Methods inherited from class StatsView
getDefault, getDisplayName, initFilters, initStats
-
Field Details
-
OC_INPROGRESS
-
OC_DONE
@Internal public static final int OC_DONEAnIntegercorresponding to the outline color that is to be used for statistics widgets that are considered "complete", usually for advancement progress tracking (ex. diet and monster hunting).- See Also:
-
-
Constructor Details
-
SubjectStatsView
public SubjectStatsView()
-
-
Method Details
-
getStatsPredicate
@Virtual @NotNull protected @NotNull Predicate<SS> getStatsPredicate(@NotNull StatsView.Filters filters) throws NullPointerException - Parameters:
filters- TheStatsView.Filters.- Throws:
NullPointerException- If the argument isnull.
-
getStatsSorter
@Virtual @NotNull protected @NotNull Comparator<SS> getStatsSorter(@NotNull StatsView.Filters filters) throws NullPointerException - Parameters:
filters- TheStatsView.Filters.- Throws:
NullPointerException- If the argument isnull.
-
getStatsGrouper
@Virtual @NotNull protected @NotNull Function<Iterable<SS>, LinkedHashMap<net.minecraft.network.chat.Component, Iterable<SS>>> getStatsGrouper(@NotNull StatsView.Filters filters) throws NullPointerException TheFunctionthat takes a collection ofSubjectStatsand groups them into aMapbased on theStatsView.Filters.- Parameters:
filters- TheStatsView.Filters.- Throws:
NullPointerException- If the argument isnull.
-