Convert position to chunk position without loading a world

Discussion in 'Plugin Development' started by Philipp15b, Apr 13, 2013.

Thread Status:
Not open for further replies.
  1. Hello, I have to convert a regular position from a world to a chunk position, but without loading the world itself for Multiworld plugin support such as My Worlds. Are there any helper methods for this available?

    Thanks in advance,
    Philipp15b
     
  2. int chunkX = locX / 16
    int chunkZ = locX / 16
    Notice there are faster methodes that use bit shifting, but I dont know them from my head
     
  3. Thanks, but there is no helper function for this in Bukkit? Because Bukkit implementations (like Spout with BukkitBridge) could theoretically use different chunk formats.

    Edit: Dividing by 16 equals shifting right by 4.
     
  4. I think the chance of this is realy rare because chunk generators needs to give this size chunks
     
Thread Status:
Not open for further replies.

Share This Page