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

How to send ChangeDimensionPacket

Discussion in 'Development' started by Dog2puppy, Jan 3, 2017.

  1. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    I'm wanting to send the ChangeDimensionPacket but I'm not sure how to send packets.
     
    0x15f likes this.
  2. 0x15f

    0x15f Baby Zombie

    Messages:
    145
    GitHub:
    0x15f
    How to use ChangeDimensionPacket:
    PHP:
    <?php
    $pk 
    = new ChangeDimensionPacket()
    $pk->dimension //1 is the nether; 0 is the overworld
    $pk->= (int) $x //define X
    $pk->= (int) $y //define Y
    $pk->= (int) $z //define Z
    $player->dataPacket($pk//$player must be an instance of a pocketmine/Player
     
    jasonwynn10 likes this.
  3. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    Thanks.
     
  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.