From 7701e1ff988af54eee167bc3e2281762b6c017d7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 10 Sep 2021 16:52:27 +0100 Subject: [PATCH] InGamePacketHandler: fix regression in movement handling since 82c8fa696a2e8609d8ae086c52f96abe7c7705b6 fixes #4291 fixes #4398 --- src/network/mcpe/handler/InGamePacketHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index 47e0debeb..c36510d02 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -177,7 +177,7 @@ class InGamePacketHandler extends PacketHandler{ $this->player->setRotation($yaw, $pitch); $curPos = $this->player->getLocation(); - $newPos = $packet->position->subtract(0, 1.62, 0); + $newPos = $packet->position->round(4)->subtract(0, 1.62, 0); if($this->forceMoveSync and $newPos->distanceSquared($curPos) > 1){ //Tolerate up to 1 block to avoid problems with client-sided physics when spawning in blocks $this->session->getLogger()->debug("Got outdated pre-teleport movement, received " . $newPos . ", expected " . $curPos);