From e6effaa6d936fe66690fbada9f56af5e073d8cf1 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Wed, 22 Feb 2023 00:13:50 +0300 Subject: [PATCH] some missing features readded, fixed containers --- src/Player.php | 10 +++++----- src/network/protocol/packet/ContainerOpenPacket.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Player.php b/src/Player.php index a7ffee7c..45821ade 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1473,7 +1473,7 @@ class Player{ $pos = new Position($this->entity->x, $this->entity->y, $this->entity->z, $this->level); //} $pData = $this->data->get("position"); - $this->server->schedule(20, array($this, "teleport"), $pos); + //$this->server->schedule(20, array($this, "teleport"), $pos); //$this->teleport($pos, isset($pData["yaw"]) ? $pData["yaw"] : false, isset($pData["pitch"]) ? $pData["pitch"] : false, true, true); $this->entity->setHealth($this->data->get("health"), "spawn", true); $this->spawned = true; @@ -1490,11 +1490,11 @@ class Player{ foreach($array as $msg){ $this->sendChat($msg."\n"); } - - /*$this->sendInventory(); - $this->sendSettings();*/ $this->orderChunks(); - //$this->getNextChunk($this->level); + //$this->getNextChunk($this->level); + $this->sendInventory(); + $this->sendSettings(); + $this->teleport($pos); $this->loadAllChunks(); $this->blocked = false; diff --git a/src/network/protocol/packet/ContainerOpenPacket.php b/src/network/protocol/packet/ContainerOpenPacket.php index 92eecd78..fcac7b54 100644 --- a/src/network/protocol/packet/ContainerOpenPacket.php +++ b/src/network/protocol/packet/ContainerOpenPacket.php @@ -20,7 +20,7 @@ class ContainerOpenPacket extends RakNetDataPacket{ $this->reset(); $this->putByte($this->windowid); $this->putByte($this->type); - $this->putByte($this->slots); + $this->putShort($this->slots); $this->putInt($this->x); $this->putInt($this->y); $this->putInt($this->z);