Merge branch 'stable' into minor-next

This commit is contained in:
Dylan K. Taylor 2023-07-18 22:22:37 +01:00
commit 6fbc133e5d
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
5 changed files with 45 additions and 18 deletions

View File

@ -24,3 +24,9 @@ Released 14th July 2023.
## Fixes
- Hardened validation of JWT signing keys in `LoginPacket`.
- Fixed server crash due to a bug in upstream dependency [`netresearch/jsonmapper`](https://github.com/cweiske/JsonMapper).
# 4.23.2
Released 18th July 2023.
## Fixes
- Fixed login errors due to a new `sandboxId` field appearing in the Xbox Live authentication data in `LoginPacket`. All clients, regardless of version, are affected by this change.

View File

@ -31,3 +31,19 @@ Released 14th July 2023.
## General
- Updated `build/php` submodule to pmmp/PHP-Binaries@e0c918d1379465964acefd562d9e48f87cfc2c9e.
# 5.3.2
Released 18th July 2023.
## Included releases
**This release includes changes from the following releases:**
- [4.23.2](https://github.com/pmmp/PocketMine-MP/blob/4.23.2/changelogs/4.23.md#4232) - Fix for `sandboxId`-related login errors
## Documentation
- Fixed documentation error in `StringToTParser`.
## Fixes
- Fixed turtle helmet not being able to be unequipped.
## Internals
- Armor pieces are no longer set back into the armor inventory if no change was made. This reduces the number of slot updates sent to clients, as well as avoiding unnecessary updates for armor pieces which have Unbreaking enchantments.

24
composer.lock generated
View File

@ -276,16 +276,16 @@
},
{
"name": "pocketmine/bedrock-protocol",
"version": "23.0.0+bedrock-1.20.10",
"version": "23.0.1+bedrock-1.20.10",
"source": {
"type": "git",
"url": "https://github.com/pmmp/BedrockProtocol.git",
"reference": "0cfaafdc02cca882a50773d6c02ebfeb622614e2"
"reference": "db48400736799cc3833a2644a02e308992a98fa8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/0cfaafdc02cca882a50773d6c02ebfeb622614e2",
"reference": "0cfaafdc02cca882a50773d6c02ebfeb622614e2",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/db48400736799cc3833a2644a02e308992a98fa8",
"reference": "db48400736799cc3833a2644a02e308992a98fa8",
"shasum": ""
},
"require": {
@ -317,9 +317,9 @@
"description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP",
"support": {
"issues": "https://github.com/pmmp/BedrockProtocol/issues",
"source": "https://github.com/pmmp/BedrockProtocol/tree/23.0.0+bedrock-1.20.10"
"source": "https://github.com/pmmp/BedrockProtocol/tree/23.0.1+bedrock-1.20.10"
},
"time": "2023-07-12T12:19:40+00:00"
"time": "2023-07-18T21:07:24+00:00"
},
{
"name": "pocketmine/binaryutils",
@ -1937,16 +1937,16 @@
},
{
"name": "phpunit/phpunit",
"version": "10.2.5",
"version": "10.2.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd"
"reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd",
"reference": "15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c17815c129f133f3019cc18e8d0c8622e6d9bcd",
"reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd",
"shasum": ""
},
"require": {
@ -2018,7 +2018,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.2.5"
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.6"
},
"funding": [
{
@ -2034,7 +2034,7 @@
"type": "tidelift"
}
],
"time": "2023-07-14T04:18:47+00:00"
"time": "2023-07-17T12:08:28+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.3.2";
public const BASE_VERSION = "5.3.3";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable";

View File

@ -487,14 +487,16 @@ abstract class Living extends Entity{
public function damageArmor(float $damage) : void{
$durabilityRemoved = (int) max(floor($damage / 4), 1);
$armor = $this->armorInventory->getContents(true);
foreach($armor as $item){
$armor = $this->armorInventory->getContents();
foreach($armor as $slotId => $item){
if($item instanceof Armor){
$oldItem = clone $item;
$this->damageItem($item, $durabilityRemoved);
if(!$item->equalsExact($oldItem)){
$this->armorInventory->setItem($slotId, $item);
}
}
}
$this->armorInventory->setContents($armor);
}
private function damageItem(Durable $item, int $durabilityRemoved) : void{
@ -640,9 +642,12 @@ abstract class Living extends Entity{
}
foreach($this->armorInventory->getContents() as $index => $item){
$oldItem = clone $item;
if($item->onTickWorn($this)){
$hasUpdate = true;
$this->armorInventory->setItem($index, $item);
if(!$item->equalsExact($oldItem)){
$this->armorInventory->setItem($index, $item);
}
}
}
}