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 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 ObjectiveCriteria
AIR, ARMOR, CODEC, DEATH_COUNT, DUMMY, EXPERIENCE, FOOD, HEALTH, KILL_COUNT_ALL, KILL_COUNT_PLAYERS, KILLED_BY_TEAM, LEVEL, TEAM_KILL, TRIGGER -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ObjectiveCriteria
byName, getCustomCriteriaNames, getDefaultRenderType, getName, isReadOnly
-
Field Details
-
STREAM_CODEC
-
formatter
-
value
The registry entry for this statistic. -
type
-
-
Constructor Details
-
Stat
-
-
Method Details
-
buildName
-
locationToKey
- Returns:
- the specified
locationas a string with.as the separator character
-
getType
-
getValue
-
format
-
equals
-
hashCode
-
toString
-