Merge remote-tracking branch 'origin/stable' into minor-next

This commit is contained in:
Dylan K. Taylor 2023-08-15 17:41:41 +01:00
commit b330cbe8e2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
5 changed files with 37 additions and 22 deletions

@ -1 +1 @@
Subproject commit ed0bc4d2afafd00f9ee92823c6b1bd66789ce4f2 Subproject commit a053f65e1897e432478229071383fe1ba16032c3

39
composer.lock generated
View File

@ -1211,16 +1211,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.16.0", "version": "v4.17.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "19526a33fb561ef417e822e85f08a00db4059c17" "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"reference": "19526a33fb561ef417e822e85f08a00db4059c17", "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1261,9 +1261,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "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", "name": "phar-io/manifest",
@ -1861,16 +1861,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "10.3.1", "version": "10.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "d442ce7c4104d5683c12e67e4dcb5058159e9804" "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d442ce7c4104d5683c12e67e4dcb5058159e9804", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0dafb1175c366dd274eaa9a625e914451506bcd1",
"reference": "d442ce7c4104d5683c12e67e4dcb5058159e9804", "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1942,7 +1942,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "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": [ "funding": [
{ {
@ -1958,7 +1958,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-04T06:48:08+00:00" "time": "2023-08-15T05:34:23+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@ -2129,16 +2129,16 @@
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "5.0.0", "version": "5.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" "reference": "2db5010a484d53ebf536087a70b4a5423c102372"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372",
"reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", "reference": "2db5010a484d53ebf536087a70b4a5423c102372",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2149,7 +2149,7 @@
"sebastian/exporter": "^5.0" "sebastian/exporter": "^5.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.0" "phpunit/phpunit": "^10.3"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -2193,7 +2193,8 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues", "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": [ "funding": [
{ {
@ -2201,7 +2202,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-02-03T07:07:16+00:00" "time": "2023-08-14T13:18:12+00:00"
}, },
{ {
"name": "sebastian/complexity", "name": "sebastian/complexity",

View File

@ -83,6 +83,10 @@ class Cake extends BaseCake{
return parent::onInteract($item, $face, $clickVector, $player, $returnedItems); return parent::onInteract($item, $face, $clickVector, $player, $returnedItems);
} }
public function getDropsForCompatibleTool(Item $item) : array{
return [];
}
public function getResidue() : Block{ public function getResidue() : Block{
$clone = clone $this; $clone = clone $this;
$clone->bites++; $clone->bites++;

View File

@ -63,6 +63,14 @@ final class PotionCauldron extends FillableCauldron{
/** @return $this */ /** @return $this */
public function setPotionItem(?Item $potionItem) : self{ 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; $this->potionItem = $potionItem !== null ? (clone $potionItem)->setCount(1) : null;
return $this; return $this;
} }

View File

@ -56,15 +56,17 @@ class ChorusFruit extends Food{
$maxY = $minY + 16; $maxY = $minY + 16;
$maxZ = $minZ + 16; $maxZ = $minZ + 16;
$worldMinY = $world->getMinY();
for($attempts = 0; $attempts < 16; ++$attempts){ for($attempts = 0; $attempts < 16; ++$attempts){
$x = mt_rand($minX, $maxX); $x = mt_rand($minX, $maxX);
$y = mt_rand($minY, $maxY); $y = mt_rand($minY, $maxY);
$z = mt_rand($minZ, $maxZ); $z = mt_rand($minZ, $maxZ);
while($y >= 0 && !$world->getBlockAt($x, $y, $z)->isSolid()){ while($y >= $worldMinY && !$world->getBlockAt($x, $y, $z)->isSolid()){
$y--; $y--;
} }
if($y < 0){ if($y < $worldMinY){
continue; continue;
} }