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

Solved How to close chest head?

Discussion in 'Development' started by Yexeed, Dec 7, 2017.

  1. Yexeed

    Yexeed Slime

    Messages:
    76
    I can open a chest head using:
    PHP:
    /* getVector is returns vector that i needed */
    /* $p instanceof Player */
    $pack1 = new BlockEventPacket();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorX();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorY();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorZ();
    $pack1->eventType 1;
    $pack1->eventData 2;
    $p->dataPacket($pack1);
    but how to close chest head? i'm incrementing eventType and eventData up to 30 but it doesnt closing anyway.
    and is there a list of datas or types from mojang or something? where developers like @dktapps can take info about mcbe
     
    Last edited: Dec 7, 2017
    Kyd likes this.
  2. Yexeed

    Yexeed Slime

    Messages:
    76
    well, thank everyone for helping :) find solution by myself:
    PHP:
    /* getVector is returns vector that i needed */
    /* $p instanceof Player */
    $pack1 = new BlockEventPacket();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorX();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorY();
    $pack1->$this->getVector(self::TYPE_CHEST1)->getFloorZ();
    $pack1->eventType 1;
    $pack1->eventData 0;
    $p->dataPacket($pack1);
     
    xXNiceAssassinlo YT likes this.
  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.