pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
228 stars 54 forks source link

Question: Is there a list of stats that can be used? #49

Closed lukeeexd closed 5 years ago

lukeeexd commented 5 years ago

Trying to add new stats, like spawners broken, scaffolding placed etc etc, wondering if theres a list from minecraft that can be used. Also will 1.14 blocks work e.g scaffolding ?

pdinklag commented 5 years ago

You can write a Python module for any stat that Minecraft collects. Just create one in the mcstats/stats directory. It's easiest to use the existing ones for reference, e.g. copy one that is closely related and change it to your needs.

The only list I know of is this: https://minecraft.gamepedia.com/Statistics

Other statistics are mob kills, blocks mined, etc for each type. Take a look a the existing modules and player statistic JSON files too, they give good hints as to what's there.

lukeeexd commented 5 years ago

Yeah I've been adding ones by using template of others. Just havent seen one about breaking spawners so don't know how I'd add it

pdinklag commented 5 years ago

Well, you'll have to find the block ID for spawners. The Minecraft Wiki has this kind of information, so that's the go-to reference.

lukeeexd commented 5 years ago

Oh so i can literally do mcstats.StatReader(['minecraft:mined','minecraft:monster_spawner']), ?

pdinklag commented 5 years ago

If minecraft:monster_spawner is the correct ID, yep, that's it! I believe it's just minecraft:spawner, but you can double-check that ( https://minecraft.gamepedia.com/Spawner ).

lukeeexd commented 5 years ago

Yep that worked. Do you know if theres one for words said?

pdinklag commented 5 years ago

Not that I know of. I guess those kinds of stats would be listed under that Wiki page I linked.

Anyway, feel free to create pull requests for new stats, always good to get fresh ideas. Didn't think about spawners myself, it's a good one! :+1:

lukeeexd commented 5 years ago

How do I pull request?

pdinklag commented 5 years ago

Never mind if it's too much of a hassle, I will probably incorporate those awards myself.