From f2b710c083799e0dcd7e04d95545f6f8c5f2c116 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 08:31:31 +0100 Subject: [PATCH 1/4] Bump build/php from `a053f65` to `d75f83e` (#6017) Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `a053f65` to `d75f83e`. - [Release notes](https://github.com/pmmp/php-build-scripts/releases) - [Commits](https://github.com/pmmp/php-build-scripts/compare/a053f65e1897e432478229071383fe1ba16032c3...d75f83e7ef784d6581310901800a47d179602e94) --- updated-dependencies: - dependency-name: build/php dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index a053f65e1..d75f83e7e 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit a053f65e1897e432478229071383fe1ba16032c3 +Subproject commit d75f83e7ef784d6581310901800a47d179602e94 From 09c9dfb576cec5ff4029c31f8cb77d57c4095246 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:43:05 +0100 Subject: [PATCH 2/4] Bump build/php from `d75f83e` to `8884039` (#6018) Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `d75f83e` to `8884039`. - [Release notes](https://github.com/pmmp/php-build-scripts/releases) - [Commits](https://github.com/pmmp/php-build-scripts/compare/d75f83e7ef784d6581310901800a47d179602e94...8884039bee1db64acca83edd57ed5e25d69287b9) --- updated-dependencies: - dependency-name: build/php dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index d75f83e7e..8884039be 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit d75f83e7ef784d6581310901800a47d179602e94 +Subproject commit 8884039bee1db64acca83edd57ed5e25d69287b9 From 1a18e32011ad5c9f554afd8ff2042986d8ec8ac8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:43:31 +0100 Subject: [PATCH 3/4] Bump ncipollo/release-action from 1.12.0 to 1.13.0 (#6019) Bumps [ncipollo/release-action](https://github.com/ncipollo/release-action) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/ncipollo/release-action/releases) - [Commits](https://github.com/ncipollo/release-action/compare/v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: ncipollo/release-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index d135d0cc4..7dc9f08b1 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -86,7 +86,7 @@ jobs: ${{ github.workspace }}/build_info.json - name: Create draft release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1.13.0 with: artifacts: ${{ github.workspace }}/PocketMine-MP.phar,${{ github.workspace }}/start.*,${{ github.workspace }}/build_info.json commit: ${{ github.sha }} From 19e3d339f6c119fb30b49e2a502b69882fee310f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=89=E3=81=B2=E3=81=8B=E3=81=A0?= Date: Tue, 29 Aug 2023 19:43:21 +0900 Subject: [PATCH 4/4] InGamePacketHandler: subtract from raw position before rounding it (#6022) This allows better compensation for floating point errors introduced by the subtraction of the 1.62 height offset. For example, if the player is at y=7 exactly, their Y coordinate will be reported as 8.62, which, because of floating point errors, will be something like `8.619999999`. Subtracting `1.62` from this (really something like `1.62000000000005...`) leads to the calculated Y coordinate being slightly below 7. Rounding after subtracting this offset allows this to be rounded to 7 sharp. Similar errors appear in various other coordinates. --- 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 729b5b51b..30841d806 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -201,7 +201,7 @@ class InGamePacketHandler extends PacketHandler{ } $hasMoved = $this->lastPlayerAuthInputPosition === null || !$this->lastPlayerAuthInputPosition->equals($rawPos); - $newPos = $rawPos->round(4)->subtract(0, 1.62, 0); + $newPos = $rawPos->subtract(0, 1.62, 0)->round(4); if($this->forceMoveSync && $hasMoved){ $curPos = $this->player->getLocation();