Package net.minecraft.stats
Class StatType<T>
java.lang.Object
net.minecraft.stats.StatType<T>
- Type Parameters:
T- the type of the associated registry's entry values
Holds a map of statistics with type
T for a corresponding registry.
A single type usually defines a particular thing to be counted, such as the number of items used or the number of blocks mined. However, there is also a custom type which uses entries from the
. This is keyed by a invalid reference
custom stat registry
ResourceLocation and can be used to count any statistic that doesn't require an associated Registry entry.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentA map of registry entries to their correspondingstatistic.private final StreamCodec<RegistryFriendlyByteBuf, Stat<T>> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
registry
-
map
A map of registry entries to their correspondingstatistic. Lazily populated byget(Object, StatFormatter). -
displayName
-
streamCodec
-
-
Constructor Details
-
StatType
-
-
Method Details