Statistics

Statistics are a system that were added to Minecraft in the 1.5 update. Notch talked about statistics (along with Achievements) on his March 18th Blog Post.

Saving of stats online was considered for the 1.6 update, but was considered too error prone at that point

The statistics window is divided into three sections: General, Blocks and Items. The General screen shows a multitude of generic statistics which are listed in the table below. The Blocks screen shows the number of times different blocks have been crafted, used(placed) and mined. The Items screen shows the number of times different items have been depleted, crafted and used to destroy blocks. The buttons at the top of the Blocks and Items screens can be used to sort the list.

Storage
Statistics are stored in .minecraft/stats_username_unsent.dat. They keep track of these stats, as well as achievements earned. The file structure is like so:

{      "user":{ "name":"xxxxxxxx", "sessionid":"local" },      "stats-change":[ {"id":value}, {"id":value}, ],      "checksum":"xxxxxxxxxxxxxxxx" } Statistics are stored in the stats-change section. The checksum appears to be a standard md5 checksum, but the data used to generate it is unknown. If any information is changed and the checksum is incorrect, all stats will be deleted by Minecraft. All of these fields are empty unless they need updating. For example, until you jump, the number of times you've jumped will not be recorded. Distance is stored in centimeters, and time is stored in ticks (where one tick equals 0.052 seconds). An example entry for Times Played: {"1002",4}

This section also stores achievements and block information. Achievements have an ID based on their location in Achievements plus 5242880. For example, 5242880 is "Taking inventory", and 5242882 is "Benchmarking". The value indicates how many times that achievement has been earned (the "Achievement Get" message is not displayed every time). Blocks are saved in a similar fashion, but the ID is 16777216 plus the block ID. The value is the number of times that block has been mined.

Trivia

 * The statistics ignore metadata. As such, all types of wood, wool, saplings, and dye will be counted as the same item. Coal and charcoal are also treated as the same.
 * Firing an arrow from a bow does not count as using it.
 * "Times Crafted" includes smelting, such as smelting wood for charcoal.
 * On the items tab, there is no tooltip on Ink sac. This is because the Ink sac is the damage value 0 of the dye ID (read the first trivia).
 * The "Times Crafted" symbol is a hammer and anvil. In the actual game, crafting is done with a Crafting Table.
 * If you look at the icons for the compass and the clock in Statistics, the icons will show you the direction to where you spawned and the current time it was when you paused the game.

Bugs

 * Statistics do not record (since their introduction) item creation when you shift + click from the crafting or furnace GUI.
 * In Beta 1.8.1, Long Grass looks like a dark green Dead Shrub when viewed in the statistics list.