Resources Left

Discussion in 'Bukkit Tools' started by gamerx93, Jun 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline



    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!
  2. Offline

    Codex Arcanum

    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.
  3. Offline


    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?
  4. Offline


    I'd say daily. That's a lot of processing, though.
    Coding it wouldn't be the issue, actually.
  5. Offline


    Easy and do it with another Thread not to overload your server
  6. Offline


    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.
  7. Offline


    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 ^^.
Thread Status:
Not open for further replies.

Share This Page