From 8b1a84f2bf96db08e355935b92578a359f552e9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Jun 2021 16:49:19 +0100 Subject: [PATCH 1/8] Bump phpunit/phpunit from 9.5.5 to 9.5.6 (#4282) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.5 to 9.5.6. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.5...9.5.6) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 77509cf7a..b3315038a 100644 --- a/composer.lock +++ b/composer.lock @@ -1496,16 +1496,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.5", + "version": "9.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", "shasum": "" }, "require": { @@ -1535,7 +1535,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.2", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -1583,7 +1583,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.6" }, "funding": [ { @@ -1595,7 +1595,7 @@ "type": "github" } ], - "time": "2021-06-05T04:49:07+00:00" + "time": "2021-06-23T05:14:38+00:00" }, { "name": "sebastian/cli-parser", From 0cdc04f9b519d04cac3bdc3b7f395f9e58ba0fb8 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 26 Jun 2021 18:56:11 +0100 Subject: [PATCH 2/8] Player: Fixed so-called 'pot lag' this occurred because of transactions arriving before MobEquipmentPacket updating the player's own held item slot. This was only a problem while rapidly changing hotbar slots and simultaneously using items, like projectiles. closes #4168 --- src/pocketmine/Player.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 7c1cdf838..5582645b0 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2529,6 +2529,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $blockVector = $packet->trData->getBlockPos(); $face = $packet->trData->getFace(); + if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){ + $this->inventory->equipItem($packet->trData->getHotbarSlot()); + } + switch($packet->trData->getActionType()){ case UseItemTransactionData::ACTION_CLICK_BLOCK: //TODO: start hack for client spam bug @@ -2687,6 +2691,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ return false; } + if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){ + $this->inventory->equipItem($packet->trData->getHotbarSlot()); + } + switch($packet->trData->getActionType()){ case UseItemOnEntityTransactionData::ACTION_INTERACT: break; //TODO @@ -2778,6 +2786,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $this->inventory->sendContents($this); return false; }elseif($packet->trData instanceof ReleaseItemTransactionData){ + if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){ + $this->inventory->equipItem($packet->trData->getHotbarSlot()); + } + try{ switch($packet->trData->getActionType()){ case ReleaseItemTransactionData::ACTION_RELEASE: From de46a81cf4f2e70c68fdaf0cfd5e54940675d092 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 14:07:49 +0100 Subject: [PATCH 3/8] Bump phpstan/phpstan from 0.12.90 to 0.12.91 (#4296) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.90 to 0.12.91. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.90...0.12.91) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 61aeea5d1..684d88166 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "pocketmine/spl": "^0.4.0" }, "require-dev": { - "phpstan/phpstan": "0.12.90", + "phpstan/phpstan": "0.12.91", "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.2", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index b3315038a..5746ee9bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4edd0dabe529d2c8668d1f3ee40033a6", + "content-hash": "94852d3414c2feabe1233b5a58decee2", "packages": [ { "name": "adhocore/json-comment", @@ -1009,16 +1009,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.90", + "version": "0.12.91", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "f0e4b56630fc3d4eb5be86606d07212ac212ede4" + "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f0e4b56630fc3d4eb5be86606d07212ac212ede4", - "reference": "f0e4b56630fc3d4eb5be86606d07212ac212ede4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8226701cd228a0d63c2df995de7ab6070c69ac6a", + "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a", "shasum": "" }, "require": { @@ -1049,7 +1049,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.90" + "source": "https://github.com/phpstan/phpstan/tree/0.12.91" }, "funding": [ { @@ -1069,7 +1069,7 @@ "type": "tidelift" } ], - "time": "2021-06-18T07:15:38+00:00" + "time": "2021-07-04T15:31:48+00:00" }, { "name": "phpstan/phpstan-phpunit", From 5420e76a9ab8207575465d7f0c6c0265e3b6ecea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 13:20:03 +0000 Subject: [PATCH 4/8] Bump phpstan/phpstan-strict-rules from 0.12.9 to 0.12.10 (#4295) --- composer.lock | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 5746ee9bb..b92f06452 100644 --- a/composer.lock +++ b/composer.lock @@ -1127,16 +1127,16 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "0.12.9", + "version": "0.12.10", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "0705fefc7c9168529fd130e341428f5f10f4f01d" + "reference": "ce82a050f9da4a32e438272907e38cdd04806223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/0705fefc7c9168529fd130e341428f5f10f4f01d", - "reference": "0705fefc7c9168529fd130e341428f5f10f4f01d", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/ce82a050f9da4a32e438272907e38cdd04806223", + "reference": "ce82a050f9da4a32e438272907e38cdd04806223", "shasum": "" }, "require": { @@ -1144,10 +1144,9 @@ "phpstan/phpstan": "^0.12.66" }, "require-dev": { - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^7.5.20" + "phpunit/phpunit": "^9.5" }, "type": "phpstan-extension", "extra": { @@ -1172,9 +1171,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.9" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.10" }, - "time": "2021-01-13T08:50:28+00:00" + "time": "2021-07-04T14:57:39+00:00" }, { "name": "phpunit/php-code-coverage", From e6285a0312b9241beeaf34d43be3428e1af5ec2d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Jul 2021 17:22:32 +0100 Subject: [PATCH 5/8] Update composer transitive dependencies --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index b92f06452..0658269c9 100644 --- a/composer.lock +++ b/composer.lock @@ -617,16 +617,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.5", + "version": "v4.11.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fe14cf3672a149364fb66dfe11bf6549af899f94", + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94", "shasum": "" }, "require": { @@ -667,9 +667,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.11.0" }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2021-07-03T13:36:55+00:00" }, { "name": "phar-io/manifest", From 72e4660800aa2c4a982db5917b5668c36532ad2a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Jul 2021 18:42:35 +0100 Subject: [PATCH 6/8] Updated build/php submodule to pmmp/php-build-scripts@4bf8ec1ad047e84c10ca1dec5c991e47c34db7e4 --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index 0a0ac2abb..4bf8ec1ad 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 0a0ac2abb3affe8e816361e85d93a8a8d8420c6b +Subproject commit 4bf8ec1ad047e84c10ca1dec5c991e47c34db7e4 From a50ef2af6f6a695e3002f4397ff089635c181dbb Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Jul 2021 18:49:26 +0100 Subject: [PATCH 7/8] Release 3.21.1 --- changelogs/3.21.md | 4 ++++ src/pocketmine/VersionInfo.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelogs/3.21.md b/changelogs/3.21.md index 00a0e1442..ac840df7d 100644 --- a/changelogs/3.21.md +++ b/changelogs/3.21.md @@ -9,3 +9,7 @@ Plugin developers should **only** update their required API to this version if y # 3.21.0 - PHP 7.4 is now required as a minimum. - A workaround for player movement added in 1.14.30 has been removed. + +# 3.21.1 +- Fixed so-called 'pot lag' - a bug that could occur when using items while rapidly switching hotbar slots. +- Plugins in crashdumps are now ordered alphabetically for easier reading. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 4b6f2ad64..a3603d7c0 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,5 +34,5 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.21.1"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From 1122131c8d9b886c51a5713632ccb5ac0ed29612 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Jul 2021 18:49:26 +0100 Subject: [PATCH 8/8] 3.21.2 is next --- src/pocketmine/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index a3603d7c0..78c1e253b 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,6 +33,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.21.1"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.21.2"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0;