Class SUStat<T>
java.lang.Object
io.github.thecsdev.betterstats.api.util.stats.SUStat<T>
- Direct Known Subclasses:
SUGeneralStat
,SUItemStat
,SUMobStat
,SUPlayerBadgeStat
A "Stat utils stat".
Represents a statistic about something, whether it be about Item
s,
or EntityType
s, or anything else. This is a utility class for
easier reading of statistics about given things.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.util.Identifier
protected final net.minecraft.util.Identifier
protected final String
protected final net.minecraft.text.Text
protected final String
protected final IStatsProvider
-
Constructor Summary
ModifierConstructorDescriptionprotected
SUStat
(IStatsProvider statsProvider, net.minecraft.util.Identifier statId, net.minecraft.text.Text statLabel) -
Method Summary
Modifier and TypeMethodDescriptionfinal net.minecraft.util.Identifier
Returns the uniqueIdentifier
associated with thisSUStat
.final net.minecraft.text.Text
Returns theText
ual label that represents theStat
.final IStatsProvider
Returns theIStatsProvider
theStats
data was obtained from.abstract boolean
isEmpty()
boolean
matchesSearchQuery
(String search)
-
Field Details
-
ID_NULL
public static final net.minecraft.util.Identifier ID_NULL -
statsProvider
-
statId
protected final net.minecraft.util.Identifier statId -
statLabel
protected final net.minecraft.text.Text statLabel -
statLabelSQ
-
statIdSQ
-
-
Constructor Details
-
SUStat
protected SUStat(IStatsProvider statsProvider, net.minecraft.util.Identifier statId, net.minecraft.text.Text statLabel) throws NullPointerException - Throws:
NullPointerException
-
-
Method Details
-
getStatLabel
public final net.minecraft.text.Text getStatLabel()Returns theText
ual label that represents theStat
. -
getStatID
public final net.minecraft.util.Identifier getStatID()Returns the uniqueIdentifier
associated with thisSUStat
.For
SUGeneralStat
, refers toStat.getValue()
,
forSUItemStat
, refers toItem
'sIdentifier
,
forSUMobStat
, refers toEntityType
'sIdentifier
. -
getStatsProvider
Returns theIStatsProvider
theStats
data was obtained from. -
matchesSearchQuery
- Parameters:
search
- The search query being performed.- See Also:
-
isEmpty
public abstract boolean isEmpty()
-