Class SUGeneralStat
java.lang.Object
io.github.thecsdev.betterstats.api.util.stats.SUStat<net.minecraft.util.Identifier>
io.github.thecsdev.betterstats.api.util.stats.SUGeneralStat
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.text.Text
final int
The rawInteger
value of thisStat
.final net.minecraft.text.Text
Fields inherited from class io.github.thecsdev.betterstats.api.util.stats.SUStat
ID_NULL, statId, statIdSQ, statLabel, statLabelSQ, statsProvider
-
Constructor Summary
ConstructorDescriptionSUGeneralStat
(IStatsProvider statsProvider, net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat) -
Method Summary
Modifier and TypeMethodDescriptionfinal net.minecraft.stat.Stat
<net.minecraft.util.Identifier> Returns the "general"Stat
that corresponds with thisSUGeneralStat
.static List
<SUGeneralStat> getGeneralStats
(IStatsProvider statsProvider, @Nullable Predicate<SUGeneralStat> filter) Obtains a list of all "general"Stat
s in form ofSUGeneralStat
.static net.minecraft.text.Text
getGeneralStatText
(net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat) Returns theText
that should correspond to a given generalSUGeneralStat
, usinggetGeneralStatTranslationKey(Stat)
.static String
getGeneralStatTranslationKey
(net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat) Returns the translation key for a givenStat
.final boolean
isEmpty()
Methods inherited from class io.github.thecsdev.betterstats.api.util.stats.SUStat
getStatID, getStatLabel, getStatsProvider, matchesSearchQuery
-
Field Details
-
TEXT_VALUE
public static final net.minecraft.text.Text TEXT_VALUE -
value
public final int valueThe rawInteger
value of thisStat
. -
valueText
public final net.minecraft.text.Text valueText- See Also:
-
-
Constructor Details
-
SUGeneralStat
public SUGeneralStat(IStatsProvider statsProvider, net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat)
-
-
Method Details
-
getGeneralStat
public final net.minecraft.stat.Stat<net.minecraft.util.Identifier> getGeneralStat()Returns the "general"Stat
that corresponds with thisSUGeneralStat
. -
isEmpty
public final boolean isEmpty()Description copied from class:SUStat
-
getGeneralStatTranslationKey
public static String getGeneralStatTranslationKey(net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat) Returns the translation key for a givenStat
.- Parameters:
stat
- The statistic in question.
-
getGeneralStatText
public static net.minecraft.text.Text getGeneralStatText(net.minecraft.stat.Stat<net.minecraft.util.Identifier> stat) Returns theText
that should correspond to a given generalSUGeneralStat
, usinggetGeneralStatTranslationKey(Stat)
. -
getGeneralStats
public static List<SUGeneralStat> getGeneralStats(IStatsProvider statsProvider, @Nullable @Nullable Predicate<SUGeneralStat> filter) Obtains a list of all "general"Stat
s in form ofSUGeneralStat
.- Parameters:
statsProvider
- TheIStatsProvider
.filter
- Optional. APredicate
used to filter out any unwantedSUGeneralStat
s.
-