tell a chunk to load

Discussion in 'Plugin Development' started by matter123, Mar 21, 2011.

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

    matter123

    how would i go about getting a specific chunk to load if i got the x and z cords of the chunk
     
  2. Offline

    Edward Hand

    if you have the chunk coordinates:
    Code:
    world.loadChunk(x,z)
    if you have world coordinates:
    Code:
    loadChunk(x>>4,z>>4)
     
  3. Offline

    matter123

    thank you if i used chunk.getx() and chunk.getz() which one would i use
     
  4. Offline

    andreblue

    both seeing as you need 2?
     
  5. Offline

    bleachisback

    The first of the two.
     
  6. Offline

    Baummann

    Code:java
    1. Location loc = new Location(player.getLocation());
    2. Chunk c = loc.getBlock().getChunk();
    3. World world = player.getWorld();
    4. world.loadChunk(c);

    That would load the chunk the player is in.
     
  7. Offline

    matter123

    did you guys really revive a 3 month old thread?
     
  8. Offline

    bleachisback

    =O
    I didn't even notice, just trying to help
     
  9. Offline

    matter123

    its okay
     
Thread Status:
Not open for further replies.

Share This Page