Chunk not loading

Discussion in 'Plugin Development' started by vildaberper, Apr 17, 2011.

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

    vildaberper

    Whenever I create a world with;
    Code:
    this.getServer().createWorld("derp", World.Environment.NORMAL);
    
    it creates/loads that world perfectly, but when I join with;
    Code:
    player.teleport(this.getServer().getWorld("derp").getSpawnLocation());
    
    the chunk under me wont load.
    The rest of the world is loading fine.

    Why wont that damn chunk load?
     
  2. Offline

    desmin88

    @vildaberper
    Why not just load the chunk before hand, like so
    Code:
    Location spawn = this.getServer().getWorld("derp").getSpawnLocation()
    Chunk chunktoload = this.getServer().getWorld("derp").getChunkAt(spawn)
    this.getServer().getWorld("derp").loadChunk(chunktoload)
     
  3. Offline

    vildaberper

    I actually just tried that, and prevented it from unloading. But its useless, that chunk just wont load.
    Im starting to think that this is a client-side bug.
     
  4. Offline

    eisental

    You can maybe test if that's a client-side bug or not using
    Code:
    this.getServer().getWorld("derp").isChunkLoaded(spawn);
    
    Check if it returns true after teleporting.

    According to my tests using the method World.getChunkAt() will anyway cause the chunk to load which makes the loadChunk(chunktoload) call unnecessary.
     
Thread Status:
Not open for further replies.

Share This Page