1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

ChangeDimensionPacket issue

Discussion in 'Development' started by AkmalFairuz, Sep 12, 2018.

  1. AkmalFairuz

    AkmalFairuz Spider Jockey

    Messages:
    25
    GitHub:
    akmalfairuz
    Why if i use this code

    Main.php
    PHP:
    $packet ChangeDimensionPacket();
    $packet->dimension 0;
    $packet->position = new Vector3($p->x$p->y$p->z);
    $p->dataPacket($packet);
    $this->getScheduler()->scheduleDelayedTask(new UnshowTask($this$p), 100);
         
    UnshowTask.php
    PHP:
    $pk = new PlayStatusPacket();
           
    $pk->status 3;
           
    $player->dataPacket($pk);
    and after change dimension, player sometimes can't move (immobile)
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    That is because you changed to a dimension the player is already on
     
    XenialDan, AkmalFairuz and Muqsit like this.
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    A similar issue: https://forums.pmmp.io/threads/send-loading-screen.5846/#post-51966
     
    AkmalFairuz likes this.
  4. AkmalFairuz

    AkmalFairuz Spider Jockey

    Messages:
    25
    GitHub:
    akmalfairuz
    How to get player dimension?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.