Package net.minecraft.stats
Class Stat<T>
java.lang.Object
net.minecraft.world.scores.criteria.ObjectiveCriteria
net.minecraft.stats.Stat<T>
- Type Parameters:
T- the type of the registry entry for this statistic
An immutable statistic to be counted for a particular entry in the type's registry. This is used as a key in a
StatsCounter for a corresponding count.
By default, the statistic's name is formatted <stat type namespace>.<stat type path>:<value namespace>.<value path>, as created by buildName(StatType, Object).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.scores.criteria.ObjectiveCriteria
ObjectiveCriteria.RenderType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StatFormatterstatic final StreamCodec<RegistryFriendlyByteBuf, Stat<?>> The parent statistic type.private final TThe registry entry for this statistic.Fields inherited from class net.minecraft.world.scores.criteria.ObjectiveCriteria
AIR, ARMOR, DEATH_COUNT, DUMMY, EXPERIENCE, FOOD, HEALTH, KILL_COUNT_ALL, KILL_COUNT_PLAYERS, KILLED_BY_TEAM, LEVEL, TEAM_KILL, TRIGGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStat(StatType<T> pType, T pValue, StatFormatter pFormatter) -
Method Summary
Methods inherited from class net.minecraft.world.scores.criteria.ObjectiveCriteria
byName, getCustomCriteriaNames, getDefaultRenderType, getName, isReadOnly
-
Field Details
-
STREAM_CODEC
-
formatter
-
value
The registry entry for this statistic. -
type
The parent statistic type.
-
-
Constructor Details
-
Stat
-
-
Method Details
-
buildName
- Returns:
- the name for the specified
typeandvaluein the form<stat type namespace>.<stat type path>:<value namespace>.<value path>
-
locationToKey
- Returns:
- the specified
locationas a string with.as the separator character
-
getType
-
getValue
-
format
-
equals
-
hashCode
public int hashCode() -
toString
-