Bukkit's Teleport

Discussion in 'Bukkit Discussion' started by Jared Larsen, May 18, 2011.

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

    Jared Larsen

    I realize this may very well get ignored, but I'm kind of at the end of my rope so I'll ask here.

    Several bukkit plugins (Stargate, Wormholes, etc) teleport the player. But when the player arrives the immediate area around them loads fairly quickly, so the effect isn't very jarring. However, if you do the same thing using vanilla minecraft's teleport command, the player gets thrown into visual limbo while far away chunks load, causing them to have to sit and wait for things to load before they can move.

    How did bukkit get around this issue? Or am I just imaging things?
     
  2. Offline

    Drakia

    Bukkit re wrote how chunks are sent to the player.
     
  3. Offline

    Jared Larsen

    That's what I was afraid of. With Bukkit not supporting client mods yet, it leaves a lot of us caught between two untenable positions.
     
  4. Offline

    Raphfrk

    What's the issue here? Bukkit can change server side stuff only.

    The order in which chunks are sent to the player after a teleport is decided by the server.
     
  5. Offline

    Jared Larsen

    This is not a Bukkit plugin because there's client-side stuff as well. I was asking here because I have not been able to find an answer anywhere else and knowing that Bukkit plugins don't suffer the same problem, I thought I'd ask.

    I did not mean to give the impression that this was a slam against or bug in Bukkit. I just wish Bukkit would release a client-side architecture as solid as the server side of things is because frankly, the client side of Minecraft is like the Wild West right now. But that's a topic for another thread I suspect.
     
  6. Offline

    Raphfrk

    The teleport thing is purely server side. The client updates the chunks as they are sent. If you send the chunks near the player first, then those are the ones which load first.

    That would be good. Notch has said that he has less issues with server mods. The Bukkit team are hoping for some kind of official recognition, so they probably don't want to endorse client side mods.
     
  7. Offline

    Jared Larsen

    Any tips on where to start looking for that? I've spent a couple hours with a debugger and couldn't find a clear path to where the server starts sending chunks to clients.
     
  8. Offline

    Raphfrk

    Well, I know where the files are in Bukkit.

    There is a player manager class. This calls add and removePlayer.

    When the add player method is called, the chunk coords are added to the entityplayer.f list.

    This causes the entire chunk to be sent when next the entity player class is polled.

    Also, the playerInstance class is really a class that deals with chunk updates for a specific chunk. It has a list of players that need to get updates for a chunk.

    On going chunk updates are handled from there.

    I am not sure what names these classes map to.
     
Thread Status:
Not open for further replies.

Share This Page