From aad00314d745464a8df2b55e8d7bd6bee3ce9303 Mon Sep 17 00:00:00 2001 From: yefengeeeeeeeeeee <403749250@qq.com> Date: Sun, 27 Apr 2025 17:21:27 +0800 Subject: [PATCH] Fix PlaceBlock Packet handle --- src/Player.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index cabd1ee2..8674d5b8 100755 --- a/src/Player.php +++ b/src/Player.php @@ -2264,7 +2264,7 @@ class Player{ $packet->eid = $this->eid; $data = []; - if ($packet->face >= 0 and $packet->face <= 5) { //Use Block, place + if ($packet->face >= 0 and $packet->face <= 5) { if ($this->entity->inAction === true) { $this->entity->inAction = false; $this->entity->inActionCounter = 0; @@ -2274,7 +2274,7 @@ class Player{ if ($this->blocked === true or ($this->entity->position instanceof Vector3 and $blockVector->distance($this->entity->position) > 10)) { } else { - $this->server->api->block->playerBlockAction($this, $blockVector, $packet->face, $packet->fx, $packet->fy, $packet->fz); + $this->server->api->block->playerBlockAction($this, $blockVector, $packet->face, $packet->x, $packet->y, $packet->z); break; } $target = $this->level->getBlock($blockVector);