Merge branch 'stable' into minor-next

This commit is contained in:
Dylan K. Taylor 2025-06-08 18:43:31 +01:00
commit d053e9e168
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
7 changed files with 31 additions and 34 deletions

View File

@ -53,7 +53,7 @@ jobs:
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
- name: Build image for tag - name: Build image for tag
uses: docker/build-push-action@v6.16.0 uses: docker/build-push-action@v6.18.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -66,7 +66,7 @@ jobs:
- name: Build image for major tag - name: Build image for major tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.16.0 uses: docker/build-push-action@v6.18.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -79,7 +79,7 @@ jobs:
- name: Build image for minor tag - name: Build image for minor tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.16.0 uses: docker/build-push-action@v6.18.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -92,7 +92,7 @@ jobs:
- name: Build image for latest tag - name: Build image for latest tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.16.0 uses: docker/build-push-action@v6.18.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp

View File

@ -36,7 +36,7 @@
"pocketmine/bedrock-block-upgrade-schema": "~5.1.0+bedrock-1.21.60", "pocketmine/bedrock-block-upgrade-schema": "~5.1.0+bedrock-1.21.60",
"pocketmine/bedrock-data": "~5.0.0+bedrock-1.21.80", "pocketmine/bedrock-data": "~5.0.0+bedrock-1.21.80",
"pocketmine/bedrock-item-upgrade-schema": "~1.14.0+bedrock-1.21.50", "pocketmine/bedrock-item-upgrade-schema": "~1.14.0+bedrock-1.21.50",
"pocketmine/bedrock-protocol": "~38.0.0+bedrock-1.21.80", "pocketmine/bedrock-protocol": "~38.1.0+bedrock-1.21.80",
"pocketmine/binaryutils": "^0.2.1", "pocketmine/binaryutils": "^0.2.1",
"pocketmine/callback-validator": "^1.0.2", "pocketmine/callback-validator": "^1.0.2",
"pocketmine/color": "^0.3.0", "pocketmine/color": "^0.3.0",
@ -52,7 +52,7 @@
"symfony/filesystem": "~6.4.0" "symfony/filesystem": "~6.4.0"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "2.1.16", "phpstan/phpstan": "2.1.17",
"phpstan/phpstan-phpunit": "^2.0.0", "phpstan/phpstan-phpunit": "^2.0.0",
"phpstan/phpstan-strict-rules": "^2.0.0", "phpstan/phpstan-strict-rules": "^2.0.0",
"phpunit/phpunit": "^10.5.24" "phpunit/phpunit": "^10.5.24"

36
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "b106b34fbd6c8abdfd45931bcb18bb69", "content-hash": "3db02308c5b44b94e1c990d60ffd2f28",
"packages": [ "packages": [
{ {
"name": "adhocore/json-comment", "name": "adhocore/json-comment",
@ -256,16 +256,16 @@
}, },
{ {
"name": "pocketmine/bedrock-protocol", "name": "pocketmine/bedrock-protocol",
"version": "38.0.1+bedrock-1.21.80", "version": "38.1.0+bedrock-1.21.80",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/BedrockProtocol.git", "url": "https://github.com/pmmp/BedrockProtocol.git",
"reference": "0c1c13e970a2e1ded1609d0b442b4fcfd24cd21f" "reference": "a1fa215563517050045309bb779a67f75843b867"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/0c1c13e970a2e1ded1609d0b442b4fcfd24cd21f", "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/a1fa215563517050045309bb779a67f75843b867",
"reference": "0c1c13e970a2e1ded1609d0b442b4fcfd24cd21f", "reference": "a1fa215563517050045309bb779a67f75843b867",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -296,9 +296,9 @@
"description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP",
"support": { "support": {
"issues": "https://github.com/pmmp/BedrockProtocol/issues", "issues": "https://github.com/pmmp/BedrockProtocol/issues",
"source": "https://github.com/pmmp/BedrockProtocol/tree/38.0.1+bedrock-1.21.80" "source": "https://github.com/pmmp/BedrockProtocol/tree/38.1.0+bedrock-1.21.80"
}, },
"time": "2025-05-17T11:56:33+00:00" "time": "2025-05-28T22:19:59+00:00"
}, },
{ {
"name": "pocketmine/binaryutils", "name": "pocketmine/binaryutils",
@ -1038,16 +1038,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v5.4.0", "version": "v5.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "447a020a1f875a434d62f2a401f53b82a396e494" "reference": "ae59794362fe85e051a58ad36b289443f57be7a9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9",
"reference": "447a020a1f875a434d62f2a401f53b82a396e494", "reference": "ae59794362fe85e051a58ad36b289443f57be7a9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1090,9 +1090,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/v5.4.0" "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0"
}, },
"time": "2024-12-30T11:07:19+00:00" "time": "2025-05-31T08:24:38+00:00"
}, },
{ {
"name": "phar-io/manifest", "name": "phar-io/manifest",
@ -1214,16 +1214,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "2.1.16", "version": "2.1.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "b8c1cf533cba0c305d91c6ccd23f3dd0566ba5f9" "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/b8c1cf533cba0c305d91c6ccd23f3dd0566ba5f9", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053",
"reference": "b8c1cf533cba0c305d91c6ccd23f3dd0566ba5f9", "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1268,7 +1268,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-05-16T09:40:10+00:00" "time": "2025-05-21T20:55:28+00:00"
}, },
{ {
"name": "phpstan/phpstan-phpunit", "name": "phpstan/phpstan-phpunit",

View File

@ -256,7 +256,7 @@ abstract class BaseInventory implements Inventory, SlotValidatedInventory{
$slotItem->setCount($slotItem->getCount() + $amount); $slotItem->setCount($slotItem->getCount() + $amount);
$this->setItem($i, $slotItem); $this->setItem($i, $slotItem);
if($newItem->getCount() <= 0){ if($newItem->getCount() <= 0){
break; return $newItem;
} }
} }
} }
@ -270,7 +270,7 @@ abstract class BaseInventory implements Inventory, SlotValidatedInventory{
$slotItem->setCount($amount); $slotItem->setCount($amount);
$this->setItem($slotIndex, $slotItem); $this->setItem($slotIndex, $slotItem);
if($newItem->getCount() <= 0){ if($newItem->getCount() <= 0){
break; return $newItem;
} }
} }
} }

View File

@ -213,7 +213,7 @@ class InGamePacketHandler extends PacketHandler{
} }
$inputFlags = $packet->getInputFlags(); $inputFlags = $packet->getInputFlags();
if($inputFlags !== $this->lastPlayerAuthInputFlags){ if($this->lastPlayerAuthInputFlags === null || !$inputFlags->equals($this->lastPlayerAuthInputFlags)){
$this->lastPlayerAuthInputFlags = $inputFlags; $this->lastPlayerAuthInputFlags = $inputFlags;
$sneaking = $inputFlags->get(PlayerAuthInputFlags::SNEAKING); $sneaking = $inputFlags->get(PlayerAuthInputFlags::SNEAKING);

View File

@ -1644,7 +1644,10 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$newReplica = clone $oldHeldItem; $newReplica = clone $oldHeldItem;
$newReplica->setCount($newHeldItem->getCount()); $newReplica->setCount($newHeldItem->getCount());
if($newReplica instanceof Durable && $newHeldItem instanceof Durable){ if($newReplica instanceof Durable && $newHeldItem instanceof Durable){
$newReplica->setDamage($newHeldItem->getDamage()); $newDamage = $newHeldItem->getDamage();
if($newDamage >= 0 && $newDamage <= $newReplica->getMaxDurability()){
$newReplica->setDamage($newDamage);
}
} }
$damagedOrDeducted = $newReplica->equalsExact($newHeldItem); $damagedOrDeducted = $newReplica->equalsExact($newHeldItem);

View File

@ -702,12 +702,6 @@ parameters:
count: 1 count: 1
path: ../../../src/inventory/transaction/InventoryTransaction.php path: ../../../src/inventory/transaction/InventoryTransaction.php
-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 2
path: ../../../src/item/Item.php
- -
message: '#^Parameter \#1 \$buffer of method pocketmine\\nbt\\BaseNbtSerializer\:\:read\(\) expects string, mixed given\.$#' message: '#^Parameter \#1 \$buffer of method pocketmine\\nbt\\BaseNbtSerializer\:\:read\(\) expects string, mixed given\.$#'
identifier: argument.type identifier: argument.type