From 99f087e5e18236afd9ddd5e208d8d61ecba52de1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:21:49 +0000 Subject: [PATCH 1/7] Bump phpunit/phpunit from 9.5.12 to 9.5.13 (#4767) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.12 to 9.5.13. - [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.12...9.5.13) --- 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 7fa306c76..267df8983 100644 --- a/composer.lock +++ b/composer.lock @@ -2388,16 +2388,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.12", + "version": "9.5.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "93d4bf4c37aec6384bb9e5d390d9049a463a7256" + "reference": "597cb647654ede35e43b137926dfdfef0fb11743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/93d4bf4c37aec6384bb9e5d390d9049a463a7256", - "reference": "93d4bf4c37aec6384bb9e5d390d9049a463a7256", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/597cb647654ede35e43b137926dfdfef0fb11743", + "reference": "597cb647654ede35e43b137926dfdfef0fb11743", "shasum": "" }, "require": { @@ -2475,7 +2475,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.12" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.13" }, "funding": [ { @@ -2487,7 +2487,7 @@ "type": "github" } ], - "time": "2022-01-21T05:54:47+00:00" + "time": "2022-01-24T07:33:35+00:00" }, { "name": "sebastian/cli-parser", From 32b07e094055c42859e6ac9d937b4b055063cf3a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 24 Jan 2022 21:07:51 +0000 Subject: [PATCH 2/7] World: avoid repeated getInstance() calls in hot paths --- src/world/World.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/world/World.php b/src/world/World.php index 8fff731dd..1707e8e17 100644 --- a/src/world/World.php +++ b/src/world/World.php @@ -947,6 +947,8 @@ class World implements ChunkManager{ public function createBlockUpdatePackets(array $blocks) : array{ $packets = []; + $blockMapping = RuntimeBlockMapping::getInstance(); + foreach($blocks as $b){ if(!($b instanceof Vector3)){ throw new \TypeError("Expected Vector3 in blocks array, got " . (is_object($b) ? get_class($b) : gettype($b))); @@ -956,7 +958,7 @@ class World implements ChunkManager{ $blockPosition = BlockPosition::fromVector3($b); $packets[] = UpdateBlockPacket::create( $blockPosition, - RuntimeBlockMapping::getInstance()->toRuntimeId($fullBlock->getFullId()), + $blockMapping->toRuntimeId($fullBlock->getFullId()), UpdateBlockPacket::FLAG_NETWORK, UpdateBlockPacket::DATA_LAYER_NORMAL ); @@ -1105,6 +1107,7 @@ class World implements ChunkManager{ $entity->onRandomUpdate(); } + $blockFactory = BlockFactory::getInstance(); foreach($chunk->getSubChunks() as $Y => $subChunk){ if(!$subChunk->isEmptyFast()){ $k = 0; @@ -1121,8 +1124,7 @@ class World implements ChunkManager{ $state = $subChunk->getFullBlock($x, $y, $z); if(isset($this->randomTickBlocks[$state])){ - /** @var Block $block */ - $block = BlockFactory::getInstance()->fromFullBlock($state); + $block = $blockFactory->fromFullBlock($state); $block->position($this, $chunkX * Chunk::EDGE_LENGTH + $x, ($Y << SubChunk::COORD_BIT_SIZE) + $y, $chunkZ * Chunk::EDGE_LENGTH + $z); $block->onRandomTick(); } From 8a4bc72b3443a61db9a58c51f7aeac14c3d6e42d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 25 Jan 2022 23:33:20 +0000 Subject: [PATCH 3/7] Release 4.0.8 --- changelogs/4.0.md | 7 +++++++ src/VersionInfo.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelogs/4.0.md b/changelogs/4.0.md index 38c7cbfec..ec6f7fa60 100644 --- a/changelogs/4.0.md +++ b/changelogs/4.0.md @@ -1620,3 +1620,10 @@ Released 21st January 2022. - Fixed ender pearls teleporting players when thrown by a player directly against a wall when cancelling `ProjectileLaunchEvent`. - Fixed collision box of brewing stand. - Fixed break times and tool types of bamboo, nether wart blocks, infested stone and leaves. + +# 4.0.8 +Released 25th January 2022. + +## Fixes +- Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe. +- The correct amount of fall damage is now taken when falling from a height onto hay bales. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 5071c9a2c..f576c457b 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -32,7 +32,7 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; public const BASE_VERSION = "4.0.8"; - public const IS_DEVELOPMENT_BUILD = true; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; private function __construct(){ From 3ab5b5a79d6363c5781b681e1f3b1b8e79957f2b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 25 Jan 2022 23:33:24 +0000 Subject: [PATCH 4/7] 4.0.9 is next --- src/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VersionInfo.php b/src/VersionInfo.php index f576c457b..cce49cbb1 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,8 +31,8 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "4.0.8"; - public const IS_DEVELOPMENT_BUILD = false; + public const BASE_VERSION = "4.0.9"; + public const IS_DEVELOPMENT_BUILD = true; public const BUILD_CHANNEL = "stable"; private function __construct(){ From 1dbfedce4c8be4d8a6c78906cfd3208994f0b9da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 00:19:02 +0000 Subject: [PATCH 5/7] Bump pocketmine/locale-data from 2.3.33 to 2.4.2 (#4769) Bumps [pocketmine/locale-data](https://github.com/pmmp/Language) from 2.3.33 to 2.4.2. - [Release notes](https://github.com/pmmp/Language/releases) - [Commits](https://github.com/pmmp/Language/compare/2.3.33...2.4.2) --- updated-dependencies: - dependency-name: pocketmine/locale-data 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> --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 8eecd762e..0d92365c0 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "pocketmine/classloader": "^0.2.0", "pocketmine/color": "^0.2.0", "pocketmine/errorhandler": "^0.3.0", - "pocketmine/locale-data": "~2.3.0", + "pocketmine/locale-data": "~2.4.2", "pocketmine/log": "^0.4.0", "pocketmine/log-pthreads": "^0.4.0", "pocketmine/math": "^0.4.0", diff --git a/composer.lock b/composer.lock index 267df8983..9ae9291c5 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": "055bec16a9bbc839f4410d09b09f2703", + "content-hash": "aabbf0c3280f590f48d2edb622747341", "packages": [ { "name": "adhocore/json-comment", @@ -535,16 +535,16 @@ }, { "name": "pocketmine/locale-data", - "version": "2.3.33", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/pmmp/Language.git", - "reference": "44998ca9c055f872a33e59cd4d2736d081ba84b5" + "reference": "235694bfbef1343d7a7934974bca0726d9fdc4d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Language/zipball/44998ca9c055f872a33e59cd4d2736d081ba84b5", - "reference": "44998ca9c055f872a33e59cd4d2736d081ba84b5", + "url": "https://api.github.com/repos/pmmp/Language/zipball/235694bfbef1343d7a7934974bca0726d9fdc4d2", + "reference": "235694bfbef1343d7a7934974bca0726d9fdc4d2", "shasum": "" }, "type": "library", @@ -552,9 +552,9 @@ "description": "Language resources used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/Language/issues", - "source": "https://github.com/pmmp/Language/tree/2.3.33" + "source": "https://github.com/pmmp/Language/tree/2.4.2" }, - "time": "2022-01-16T22:08:04+00:00" + "time": "2022-01-24T17:00:08+00:00" }, { "name": "pocketmine/log", From 3155c9039631eb84b521ca9cac210e5ed2d719ee Mon Sep 17 00:00:00 2001 From: Rush2929 <76860328+Rush2929@users.noreply.github.com> Date: Wed, 26 Jan 2022 09:25:00 +0900 Subject: [PATCH 6/7] Fixed incorrect drops for Cobweb (#4759) --- src/block/Cobweb.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/block/Cobweb.php b/src/block/Cobweb.php index 680af1595..785db721d 100644 --- a/src/block/Cobweb.php +++ b/src/block/Cobweb.php @@ -39,6 +39,9 @@ class Cobweb extends Flowable{ } public function getDropsForCompatibleTool(Item $item) : array{ + if(($item->getBlockToolType() & BlockToolType::SHEARS) !== 0){ + return [$this->asItem()]; + } return [ VanillaItems::STRING() ]; From 822af4f7f5f9459c7d390e787c3cc6cb9d1b0b98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 00:45:05 +0000 Subject: [PATCH 7/7] Bump pocketmine/locale-data from 2.4.2 to 2.4.3 (#4773) Bumps [pocketmine/locale-data](https://github.com/pmmp/Language) from 2.4.2 to 2.4.3. - [Release notes](https://github.com/pmmp/Language/releases) - [Commits](https://github.com/pmmp/Language/compare/2.4.2...2.4.3) --- updated-dependencies: - dependency-name: pocketmine/locale-data dependency-type: direct:production 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 9ae9291c5..9339809ec 100644 --- a/composer.lock +++ b/composer.lock @@ -535,16 +535,16 @@ }, { "name": "pocketmine/locale-data", - "version": "2.4.2", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/pmmp/Language.git", - "reference": "235694bfbef1343d7a7934974bca0726d9fdc4d2" + "reference": "4d0b081f1a79407e087968ea76aaf330db6ea2b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Language/zipball/235694bfbef1343d7a7934974bca0726d9fdc4d2", - "reference": "235694bfbef1343d7a7934974bca0726d9fdc4d2", + "url": "https://api.github.com/repos/pmmp/Language/zipball/4d0b081f1a79407e087968ea76aaf330db6ea2b5", + "reference": "4d0b081f1a79407e087968ea76aaf330db6ea2b5", "shasum": "" }, "type": "library", @@ -552,9 +552,9 @@ "description": "Language resources used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/Language/issues", - "source": "https://github.com/pmmp/Language/tree/2.4.2" + "source": "https://github.com/pmmp/Language/tree/2.4.3" }, - "time": "2022-01-24T17:00:08+00:00" + "time": "2022-01-25T23:18:24+00:00" }, { "name": "pocketmine/log",