Hey, I am looking to implement something to tell players how many of each block are left in the map. I can do all the web-graph-type-things, but I would like to know how you extract the data from the world in real-time or whatever. Any help is appreciated!
This sounds exceeding problematic. In order to do this you would have to first iterate through every chunk that has ever been loaded on your server, then check all 65,536 blocks in each chunk, then record how many of each block there is.
This is what I thought, that this would be extremely hard to do, but I know there is a MC server that has these details on their webpage. Not sure if they are live or if they do an export daily or something?
Hmm, So perhaps they use a customized plugin. What about a single calculation, then update it whenever a block is mined? I know there's plugins that count how many of each block a player has.
Yeah. It depends if you're lazy or not. Just let's calculate it with a Thread again and again. I want hot pancakes from the computer ^^.