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

Method initStats

src/main/java/net/minecraft/stats/StatList.java:195–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 }
194
195 private static void initStats()
196 {
197 for (Item item : Item.itemRegistry)
198 {
199 if (item != null)
200 {
201 int i = Item.getIdFromItem(item);
202 String s = func_180204_a(item);
203
204 if (s != null)
205 {
206 objectUseStats[i] = (new StatCrafting("stat.useItem.", s, new ChatComponentTranslation("stat.useItem", new Object[] {(new ItemStack(item)).getChatComponent()}), item)).registerStat();
207
208 if (!(item instanceof ItemBlock))
209 {
210 itemStats.add((StatCrafting)objectUseStats[i]);
211 }
212 }
213 }
214 }
215
216 replaceAllSimilarBlocks(objectUseStats);
217 }
218
219 private static void initItemDepleteStats()
220 {

Callers 1

initMethod · 0.95

Calls 6

getIdFromItemMethod · 0.95
func_180204_aMethod · 0.95
registerStatMethod · 0.45
getChatComponentMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected