Class StatsCounter

java.lang.Object
net.minecraft.stats.StatsCounter
Direct Known Subclasses:
ServerStatsCounter

public class StatsCounter extends Object
Manages counting a set of Stat objects, stored by a map of statistics to their count.

This base StatsCounter is only used client-side for keeping track of and reading counts sent from the server.

See Also:
  • Field Details

    • stats

      protected final it.unimi.dsi.fastutil.objects.Object2IntMap<Stat<?>> stats
  • Constructor Details

    • StatsCounter

      public StatsCounter()
  • Method Details

    • increment

      public void increment(Player pPlayer, Stat<?> pStat, int pAmount)
    • setValue

      public void setValue(Player pPlayer, Stat<?> pStat, int pValue)
    • getValue

      public <T> int getValue(StatType<T> pType, T pValue)
    • getValue

      public int getValue(Stat<?> pStat)