MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / registerStat

Method registerStat

src/main/java/net/minecraft/stats/StatBase.java:89–101  ·  view source on GitHub ↗

Register the stat into StatList.

()

Source from the content-addressed store, hash-verified

87 * Register the stat into StatList.
88 */
89 public StatBase registerStat()
90 {
91 if (StatList.oneShotStats.containsKey(this.statId))
92 {
93 throw new RuntimeException("Duplicate stat id: \"" + StatList.oneShotStats.get(this.statId).statName + "\" and \"" + this.statName + "\" at id " + this.statId);
94 }
95 else
96 {
97 StatList.allStats.add(this);
98 StatList.oneShotStats.put(this.statId, this);
99 return this;
100 }
101 }
102
103 /**
104 * Returns whether or not the StatBase-derived class is a statistic (running counter) or an achievement (one-shot).

Callers 8

AchievementListClass · 0.45
StatListClass · 0.45
initCraftableStatsMethod · 0.45
initMiningStatsMethod · 0.45
initStatsMethod · 0.45
initItemDepleteStatsMethod · 0.45
getStatKillEntityMethod · 0.45
getStatEntityKilledByMethod · 0.45

Calls 4

getMethod · 0.65
putMethod · 0.65
containsKeyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected