Class StatType<T>

java.lang.Object
net.minecraft.stats.StatType<T>
Type Parameters:
T - the type of the associated registry's entry values
All Implemented Interfaces:
Iterable<Stat<T>>

public class StatType<T> extends Object implements Iterable<Stat<T>>
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

invalid reference
custom stat registry
. This is keyed by a ResourceLocation and can be used to count any statistic that doesn't require an associated Registry entry.
See Also:
  • Stat
  • Stats
  • invalid reference
    net.minecraft.core.Registry#STAT_TYPE
  • invalid reference
    net.minecraft.core.Registry#CUSTOM_STAT