Smooth Teleporting?

Discussion in 'Plugin Development' started by Quantum64, Nov 28, 2013.

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

    Quantum64

    Is there any way to teleport a player without them seeing the empty void before the chunks load. I notice this glitch even when teleporting into already loaded chunks. Is there any way to correct this?

    It is crucial for my plugin for a player to be teleported into a different location that looks the same without them noticing, but then they find something completely different behind them. muahahaha
     
  2. Offline

    xTrollxDudex

    Quantum64
    I believe that it doesn't matter whether the chunk is loaded-what should matter is whether the chunk is loaded for the client. This is impossible for the server to emulate I believe, unless you send the chunks to the player before the player teleports to the specified chunk.
     
    Mathias Eklund likes this.
  3. Offline

    Quantum64

    Well I meant client-side loaded chunks
    And would it be possible to umm... pre-send the chunks?
     
  4. Offline

    xTrollxDudex

  5. Offline

    Johnzeh

    You need to refresh the chunk before the player is teleported like so:

    Code:java
    1. Chunk chunk = ConfigUtils.getLobbyLocation().getWorld()
    2. .getChunkAt(ConfigUtils.getLobbyLocation());
    3. ConfigUtils.getLobbyLocation().getWorld()
    4. .regenerateChunk(chunk.getX(), chunk.getZ());
    5. Bukkit.getServer()
    6. .getScheduler()
    7. .scheduleSyncDelayedTask(Confliction.getPlugin(),
    8. new Runnable() {
    9. public void run() {
    10. p.teleport(ConfigUtils.getLobbyLocation());
    11. }
    12. }, 2L);
     
  6. Offline

    Quantum64

    After a bit of searching I found a thread with this same problem:
    The result was that there is no way to correct this without client side modifications (mods)
     
  7. Offline

    NathanWolf

    I feel like I've noticed this behavior is different in the 1.7 client- or is it just me? I actually like the interpolation for my blink spell, so I'm hoping if it's gone there's a way to bring it back.
     
  8. Offline

    Garris0n

    You could simply rapidly teleport them to points along the line to the end point.
     
  9. Offline

    Quantum64

    I feel this is getting off topic
    The thread is about finding a way to seamlessly teleport across long distances
     
  10. Offline

    NathanWolf

    ... Which is not possible if the client doesn't support it. I was suggesting the OP tries the 1.7 client- if it now works the way you want, then is it worth worrying about 1.6?
     
Thread Status:
Not open for further replies.

Share This Page