From f03e708f64ce8cc2d2dc7f379b127d4d990c6a5f Mon Sep 17 00:00:00 2001 From: Hugo_ <55756021+Dhaiven@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:42:58 +0200 Subject: [PATCH 1/5] Fix chorus not working if the destination would be below y=0 (#5979) --- src/item/ChorusFruit.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/item/ChorusFruit.php b/src/item/ChorusFruit.php index 80f99d5d8..c12724d7c 100644 --- a/src/item/ChorusFruit.php +++ b/src/item/ChorusFruit.php @@ -56,15 +56,17 @@ class ChorusFruit extends Food{ $maxY = $minY + 16; $maxZ = $minZ + 16; + $worldMinY = $world->getMinY(); + for($attempts = 0; $attempts < 16; ++$attempts){ $x = mt_rand($minX, $maxX); $y = mt_rand($minY, $maxY); $z = mt_rand($minZ, $maxZ); - while($y >= 0 && !$world->getBlockAt($x, $y, $z)->isSolid()){ + while($y >= $worldMinY && !$world->getBlockAt($x, $y, $z)->isSolid()){ $y--; } - if($y < 0){ + if($y < $worldMinY){ continue; } From 91d5a3ddfebbfb6824f5cb3faf3e55c6983a90cb Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 10 Aug 2023 16:06:25 +0100 Subject: [PATCH 2/5] PotionCauldron: fixed setPotionItem() not validating the given item we should probably remove this API and have enums for potion container and type tbh... this API was a mistake --- src/block/PotionCauldron.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/block/PotionCauldron.php b/src/block/PotionCauldron.php index b8259fbc3..ca91664e4 100644 --- a/src/block/PotionCauldron.php +++ b/src/block/PotionCauldron.php @@ -63,6 +63,14 @@ final class PotionCauldron extends FillableCauldron{ /** @return $this */ public function setPotionItem(?Item $potionItem) : self{ + if($potionItem !== null && !match($potionItem->getTypeId()){ + ItemTypeIds::POTION, + ItemTypeIds::SPLASH_POTION, + ItemTypeIds::LINGERING_POTION => true, + default => false, + }){ + throw new \InvalidArgumentException("Item must be a POTION, SPLASH_POTION or LINGERING_POTION"); + } $this->potionItem = $potionItem !== null ? (clone $potionItem)->setCount(1) : null; return $this; } From af9ae445fc26a3ab66f92a7aa927a534392c7cbe Mon Sep 17 00:00:00 2001 From: ipad54 <63200545+ipad54@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:42:32 +0300 Subject: [PATCH 3/5] Fix cake drops (#5985) closes #5984 --- src/block/Cake.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/block/Cake.php b/src/block/Cake.php index 81dc7e6e9..5d4e3cfca 100644 --- a/src/block/Cake.php +++ b/src/block/Cake.php @@ -83,6 +83,10 @@ class Cake extends BaseCake{ return parent::onInteract($item, $face, $clickVector, $player, $returnedItems); } + public function getDropsForCompatibleTool(Item $item) : array{ + return []; + } + public function getResidue() : Block{ $clone = clone $this; $clone->bites++; From 983aa79a0b0d1f64fcc66db5d8d88f651f1e3a83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 09:30:51 +0100 Subject: [PATCH 4/5] Bump build/php from `ed0bc4d` to `a053f65` (#5993) Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `ed0bc4d` to `a053f65`. - [Release notes](https://github.com/pmmp/php-build-scripts/releases) - [Commits](https://github.com/pmmp/php-build-scripts/compare/ed0bc4d2afafd00f9ee92823c6b1bd66789ce4f2...a053f65e1897e432478229071383fe1ba16032c3) --- 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 ed0bc4d2a..a053f65e1 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit ed0bc4d2afafd00f9ee92823c6b1bd66789ce4f2 +Subproject commit a053f65e1897e432478229071383fe1ba16032c3 From 4c25d38b44596f4ded444bb7c7aac9e098aff8fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:05:23 +0100 Subject: [PATCH 5/5] Bump phpunit/phpunit from 10.3.1 to 10.3.2 (#5995) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.3.1 to 10.3.2. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.3.2/ChangeLog-10.3.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.3.1...10.3.2) --- 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 | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index c96739b25..c864786f3 100644 --- a/composer.lock +++ b/composer.lock @@ -1211,16 +1211,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1261,9 +1261,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -1861,16 +1861,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.1", + "version": "10.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d442ce7c4104d5683c12e67e4dcb5058159e9804" + "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d442ce7c4104d5683c12e67e4dcb5058159e9804", - "reference": "d442ce7c4104d5683c12e67e4dcb5058159e9804", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0dafb1175c366dd274eaa9a625e914451506bcd1", + "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1", "shasum": "" }, "require": { @@ -1942,7 +1942,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.1" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.2" }, "funding": [ { @@ -1958,7 +1958,7 @@ "type": "tidelift" } ], - "time": "2023-08-04T06:48:08+00:00" + "time": "2023-08-15T05:34:23+00:00" }, { "name": "sebastian/cli-parser", @@ -2129,16 +2129,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { @@ -2149,7 +2149,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { @@ -2193,7 +2193,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -2201,7 +2202,7 @@ "type": "github" } ], - "time": "2023-02-03T07:07:16+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity",