Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"FastTransfer"?

Comments in 'Plugin Development' started by Kvetinac97, Jan 19, 2016.

  1. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    Hi.

    I want to ask, if Minecraft: Pocket Edition client can be transfered to another server by stopping sending them packets from Server 1 (Disconnect packet won't be delivered to MCPE client) to Server 2 (Program will already send Login packet to MCPE client)? Or it'll disconnect?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If the disconnect packet isn't sent, it shouldn't disconnect.
    You can try out that theory. Not sure if StartGamePacket send from server 2 would crash the client though.
    applqpak likes this.
  3. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Here is the theory of making an proxy server with transfer compatibility (Like BungeeCord):
    You connect to the proxy server it redirects ALL packets to the default server (Your lobby) then if you click an sign on that server the "TransferPlugin" is sending to the Server2 "HEY YOU WILL GET AN PLAYER ON IP xxx.xxx.xxx:xxxx WITH THE NAME "BLA"" and that server (with an plugin too) will wait for an packet to be sent from the proxy server wich contains something like "HEY THE PLAYER "BLA" IS NOW LISTENING TO YOU!". The "TransferPlugin" on the default Server will tell the proxy server "HEY THE PLAYER WITH IP BlaBla WANTS TO BE TRANSFERED TO Server2!" and then the proxy server just redirects all packets to the Server2 and tell the Server2 "HEY THE PLAYER "BLA" IS NOW LISTENING TO YOU!". Then the Server2 has all information it needs (playerName,IP,Port) and just starts to send chunk packets and registers the player as an normal player. The player on the default server can be kicked by the "TransferPlugin" or just left there, as the default server would kick him because of TIMOUT.

    If someone could make this its would be GREAT!
    CrazedMiner likes this.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes we all know that. We are talking about what packets should be sent to the player on the second server and what should not be sent to avoid crashing or strange behaviour.
  5. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    I'll test it now, I'll post the result here ;)
  6. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    That was an explanation for users, who do not know that and see this thread!
  7. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    Any luck @Kvetinac97?
    XFuryMCPE likes this.
  8. XFuryMCPE
    Offline

    XFuryMCPE Active Member Plugin Developer

    Joined:
    Jun 19, 2015
    Posts:
    137
    Plugins:
    2
    Minecraft User:
    XFuriousMC
  9. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    the player transfer hypixelpe is doing is quite interesting. hopefully they could share their method.
    KubixQ likes this.
  10. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    isn't it a one huge server?
    applqpak likes this.
  11. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    but after starting sending packets from Server 2, would the MCPE Client start sending packets to Server 2?
    applqpak likes this.
  12. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    No.
    PocketKiller and applqpak like this.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No, that's why you have to send the data back to Server 2.
    PocketKiller and applqpak like this.
  14. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    The proxy server must start to redirect the Packets
    The client connects to the proxy server, NOT to the defaultserver directly
  15. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    no. it is quite load balancing players across servers realtime. i dont know how they do that though.
    PocketKiller likes this.
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Again, this thread is talking about the technical implementation details of a proxy server, not the general theory.
    then explain it somewhere, this is already discussed in many other threads. But fine if you want to post here, although it is slightly off-topic.
  17. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Ok, let's get more technically...
    Does anyone know wich PACKETS are sent on WorldChange?
    Because I think we need Server2 to send EXACTLY these Packets :)
    PocketKiller likes this.
  18. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    i was also looking for this along time on MCPE's code.. nothin yet
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    World change does not change any packets at all. It simply server-side marks all chunks as "not loaded" and gradually sends the chunks to the player.
    However, there are other things to consider. For example, the client compass point (spawnpoint), the dimension (in case dimension switching gets implemented in the future).

    Technical implementation should go like this:
    • Client connects to proxy and send initial RakNet level handshake packets
    • Client sends login data packets e.g. LoginPacket to proxy, proxy responds with LoginStatusPacket
    • Proxy decides which server to forward player to. Proxy sends the retrieved login information and the client address to server using an internal protocol (not direct connection using MCPE protocol!)
    • Server sends data packets from PocketMine encapsulated in the internal protocol.
    • Proxy intercepts the packets, figures out proper data to send to the client and sends them. Proxy receives packets from client and forwards data to server.
    • When server sends signal to proxy to transfer player, proxy requests a connection from new server. If accepted, resend gamemode and other login stuff using data from new server. Send signal to old server to end player session. Send signal to new server to create a session.
  20. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    we created something and we blocked login packet and start game packet but when we transfer player to another server MCPE crashes.. what packet must client recieve than we transfer it to another server?

Share This Page

Advertisement