Getting a Chunk

Discussion in 'Plugin Development' started by Rmarmorstein, Jul 24, 2014.

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

    Rmarmorstein

    I'm having issues with getting a chunk, given the Coordinates of the Chunk (chunk.getX() and chunk.getZ()). I'm using these to save the location of the chunk in the database, as users are claiming the chunks. My issue is, coming back from the database, I need to be able to handle the chunk.

    What can I do to get a Chink from the X and Z Coordinates? or, Is there a better way to store chunks into a database?

    Thanks
     
  2. Offline

    Zettelkasten

    You properly want to use World#getChunkAt(double x, double z). Storing a chunk using its x and z coordinates is pretty good, but you want to make sure that you store the world, too.
     
  3. Offline

    Rmarmorstein

    Only going to be one world, but, thanks. I was not aware of the getChunkAt() method, thanks.
     
Thread Status:
Not open for further replies.

Share This Page