Minecraft Wiki
Advertisement

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

Notchface

Achievements will NOT be chores like “cut down 10000 trees”, but rather challenges like “ride a pig off a cliff”. Stats, however, will be used to keep track of how many trees you have cut down. The long term plan is to show achievements and stats from the profile page on minecraft.net as well, in case you want to brag.

Notch on his blog[1]


Saving of stats online was considered for the Beta 1.6 update, but was considered too error prone at that point.[2]

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.

Statistic name Description Stat ID
Times played The number of times Minecraft has been loaded. 1000
Worlds played The number of worlds that have been created. 1001
Saves loaded The number of times a world has been loaded. 1002
Multiplayer joins The number of times a multiplayer server was successfully joined. 1003
Games quit The number of times "Save and quit to title" has been clicked. 1004
Minutes Played The total amount of time played. This is not necessarily displayed in minutes - it displays in seconds, minutes, hours or days whichever makes the most sense. If the game is paused this number ceases to increase. If "5.50 h" is displayed this means that you have played for 5 hours and 30 minutes (not 50 minutes). 1100
Distance Walked The total distance walked. 2000
Distance Swum The total distance swum. Wading through water also increases this number. It does not include vertical distance from bouncing in water. 2001
Distance Fallen The total distance fallen, excluding jumping. If the player falls more than one block, the entire jump is counted. 2002
Distance Climbed The total distance traveled up ladders. 2003
Distance Flown Distance traveled upwards and forwards at the same time, while more than one block above the ground. 2004
Distance Dove The total distance you have walked underwater. 2005
Distance by Minecart The total distance traveled by minecarts. 2006
Distance by Boat The total distance traveled by boats. 2007
Distance by Pig The total distance traveled by pigs via saddles.
Jumps The total number of jumps performed. 2010
Items Dropped The number of items dropped by the player. This includes items dropped upon death. 2011
Damage Dealt The amount of damage the player has dealt in half-hearts. This does not include self-inflicted damage via arrows. 2020
Damage Taken The amount of damage the player has taken in half-hearts. 2021
Number of Deaths The number of times the player has died. 2022
Mob Kills The number of mobs the player has killed. 2023
Player Kills The number of players the player has killed (on PvP servers). Indirect kills do not count. 2024
Fish Caught The number of fish caught. 2025

Storage

Statistics are stored in .minecraft/stats/stats_username_unsent.dat. They keep track of these stats, as well as achievements earned. The file structure is JSON based, it looks like this:

    {
      "user":{
    	"name":"xxxxxxxx",
    	"sessionid":"local"
      },
      "stats-change":[
    	{"id":value},
    	{"id":value},
      ],
      "checksum":"xxxxxxxxxxxxxxxx"
    }

Statistics are stored in the stats-change section. 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:

    {"1000",4}

There is also a checksum field for the statistics data. If any information is changed and the checksum is incorrect, all stats will be deleted by Minecraft. The checksum is calculated by taking the MD5 hash of a string consisting of the sessionid (always "local" in the current implementation) followed by all of the statistics in the format "statname,value,statname,value," (in the same order as they appear above). The statname "stat.startGame", for example, corresponds to the id 1000. Note that, unlike in the standard implementation of MD5, leading zeroes are trimmed from the checksum (possibly due to an oversight in the code). Also note that when the statistics file is loaded, if any stats are in the list that are not recognized (for example, from a more recent version of Minecraft or from any mods), then the calculated checksum will not match, and the statistics file will be deleted.

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.

Statistics Screenshots

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).
  • 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.
  • When you access General Statistics from your world, the Times Played number will always be 1 bigger than Games quit.

Bugs

  • Statistics do not record (since their introduction) item creation when you shift + click from the crafting or furnace GUI.
  • grass looks like a dark green dead bush when viewed in the statistics list.
  • In SMP, when a player kills another player it will not be added to the player's "Player Kills" statistic.
  • Statistics and achievements sometimes reset themselves for no reason at all. Happens when minecraft.jar is changed or modded.

References

Advertisement