From 71e3e3652250130762110c63a2649b04865fc74c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2023 15:33:03 +0000 Subject: [PATCH 1/5] Release 4.15.3 --- changelogs/4.15.md | 9 ++++++++- src/VersionInfo.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelogs/4.15.md b/changelogs/4.15.md index b4a1f5dc4..32413bf7a 100644 --- a/changelogs/4.15.md +++ b/changelogs/4.15.md @@ -28,4 +28,11 @@ Released 24th February 2023. - Accept Minecraft: Bedrock Edition 1.19.63 (identical protocol to 1.19.62, but different version due to Mojang mixup). ## Fixes -- Fixed `World Population` timer sometimes not being stopped, causing strange results in timings reports. \ No newline at end of file +- Fixed `World Population` timer sometimes not being stopped, causing strange results in timings reports. + +# 4.15.3 +Released 7th March 2023. + +## Fixes +- Fixed `/dumpmemory` crash when any object contained an `INF` or `NaN` float value. +- Updated RakLib for security fixes. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index b54f8eed1..7bc5b2ad1 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.15.3"; - public const IS_DEVELOPMENT_BUILD = true; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; private function __construct(){ From 616844696ecb774ae40acc5c479f138cfc8da657 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2023 15:33:03 +0000 Subject: [PATCH 2/5] 4.15.4 is next --- src/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 7bc5b2ad1..84c712e65 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.15.3"; - public const IS_DEVELOPMENT_BUILD = false; + public const BASE_VERSION = "4.15.4"; + public const IS_DEVELOPMENT_BUILD = true; public const BUILD_CHANNEL = "stable"; private function __construct(){ From 93d844a28189bf954560b741d4682aa04e21d2cc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2023 16:12:27 +0000 Subject: [PATCH 3/5] build/make-release: improve support for non-stable release channels --- build/make-release.php | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/build/make-release.php b/build/make-release.php index 610dbbe6d..4466e7b6f 100644 --- a/build/make-release.php +++ b/build/make-release.php @@ -36,11 +36,13 @@ use function fwrite; use function getopt; use function is_string; use function max; +use function preg_match; use function preg_replace; use function sleep; use function sprintf; use function str_pad; use function strlen; +use function strtolower; use function system; use const STDERR; use const STDIN; @@ -102,22 +104,43 @@ function main() : void{ $filteredOpts[$optName] = $optValue; } + $channel = $filteredOpts["channel"] ?? null; if(isset($filteredOpts["current"])){ $currentVer = new VersionString($filteredOpts["current"]); }else{ $currentVer = new VersionString(VersionInfo::BASE_VERSION); } - if(isset($filteredOpts["next"])){ - $nextVer = new VersionString($filteredOpts["next"]); + + $nextVer = isset($filteredOpts["next"]) ? new VersionString($filteredOpts["next"]) : null; + + $suffix = $currentVer->getSuffix(); + if($suffix !== ""){ + if($channel === "stable"){ + fwrite(STDERR, "error: cannot release a suffixed build into the stable channel\n"); + exit(1); + } + if(preg_match('/^([A-Za-z]+)(\d+)$/', $suffix, $matches) !== 1){ + echo "error: invalid current version suffix \"$suffix\"; aborting\n"; + exit(1); + } + $nextVer ??= new VersionString(sprintf( + "%u.%u.%u-%s%u", + $currentVer->getMajor(), + $currentVer->getMinor(), + $currentVer->getPatch(), + $matches[1], + ((int) $matches[2]) + 1 + )); + $channel ??= strtolower($matches[1]); }else{ - $nextVer = new VersionString(sprintf( + $nextVer ??= new VersionString(sprintf( "%u.%u.%u", $currentVer->getMajor(), $currentVer->getMinor(), $currentVer->getPatch() + 1 )); + $channel ??= "stable"; } - $channel = $filteredOpts["channel"] ?? VersionInfo::BUILD_CHANNEL; echo "About to tag version $currentVer. Next version will be $nextVer.\n"; echo "$currentVer will be published on release channel \"$channel\".\n"; From fa131dab1259c25d48c41b4ce82de5f833eb0326 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2023 16:19:50 +0000 Subject: [PATCH 4/5] Release 4.16.0 --- changelogs/4.16.md | 41 +++++++++++++++++++++++++++++++++++++++++ src/VersionInfo.php | 6 +++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 changelogs/4.16.md diff --git a/changelogs/4.16.md b/changelogs/4.16.md new file mode 100644 index 000000000..9ba623b85 --- /dev/null +++ b/changelogs/4.16.md @@ -0,0 +1,41 @@ +**For Minecraft: Bedrock Edition 1.19.62** + +### Note about API versions +Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps. +Plugin developers should **only** update their required API to this version if you need the changes in this build. + +**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do. + +# 4.16.0 +Released 7th March 2023. + +## General +- Added granular timings for packet encode, similar to the existing timings for packet decode. +- Split `Player Network Send - Compression` timings into two timers, one for `Session Buffer` compression and one for `Broadcast` compression. +- Timings now covers several areas of the network system which were previously not counted by network timings, but were counted by total timings. This provides a better insight into the performance of the network system. + +## Performance +- Improved performance of packet batch handling by avoiding unnecessary object allocations. +- Improved performance of packet broadcasting when the broadcast size is below the batch threshold. Previously, the packets would be encoded once by every recipient, but now they are encoded once and then added to the send buffer of each session in their raw form. + - This change mostly affects servers with larger maps, where players are more widely distributed. +- Improved performance of packet broadcasting when the broadcast has only one recipient (allow the session to compress the packet with the rest of its buffer). + +## Build system +- Added a new script `build/generate-bedrockdata-path-consts.php`, which must be run whenever BedrockData is updated. This script generates a class of constants with the file paths of all BedrockData files. + +## API +### `pocketmine\entity` +- The following new API methods have been added: + - `public Entity->getGravity() : float` - returns the entity's gravity acceleration in blocks/tick^2 + - `public Entity->setGravity(float $gravity) : void` - sets the entity's gravity acceleration in blocks/tick^2 + +## Internals +- Now uses [`pocketmine/bedrock-data` 2.0.0](https://github.com/pmmp/BedrockData/releases/tag/2.0.0+bedrock-1.19.60). + - This version is now used by both PM4 and PM5, reducing maintenance burden. +- Now uses [`pocketmine/bedrock-protocol` 19.3.0](https://github.com/pmmp/BedrockProtocol/releases/tag/19.3.0+bedrock-1.19.62). + - This version provides new APIs for handling packet batches which enabled improving performance and adding new features, such as detailed packet encode timings. +- Crafting recipes and creative inventory data are now loaded from `recipes/legacy_recipes.json` and `recipes/legacy_creativeitems.json` respectively. Previously, these were loaded from BedrockData directly, but BedrockData 2.0 now uses a format which can't be supported in 4.x without BC breaks. +- Added dependencies on [`pocketmine/bedrock-block-upgrade-schema`](https://github.com/pmmp/BedrockBlockUpgradeSchema) and [`pocketmine/bedrock-item-upgrade-schema`](https://github.com/pmmp/BedrockItemUpgradeSchema). These provide mapping files no longer present in BedrockData 2.0. +- Reduced and/or eliminated most usages of `PacketBatch`, since it only appeared as a throwaway object and was therefore wasting performance. +- `Compressor` now exposes `getCompressionThreshold()` instead of `willCompress()`, which allows determining whether a batch will be compressed without allocating it. +- Added `pocketmine\data\bedrock\BedrockDataFiles`, an auto-generated class of constants with the file paths of all BedrockData files. This makes it easier to locate usages, detect unused files and avoid typos. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 9314226b2..c15d1af7b 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,9 +31,9 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "4.16.0-BETA3"; - public const IS_DEVELOPMENT_BUILD = true; - public const BUILD_CHANNEL = "beta"; + public const BASE_VERSION = "4.16.0"; + public const IS_DEVELOPMENT_BUILD = false; + public const BUILD_CHANNEL = "stable"; private function __construct(){ //NOOP From 3aec0fa3df488f8515a986e07d35aacfb07e8cf4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Mar 2023 16:19:51 +0000 Subject: [PATCH 5/5] 4.16.1 is next --- src/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VersionInfo.php b/src/VersionInfo.php index c15d1af7b..079605b38 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.16.0"; - public const IS_DEVELOPMENT_BUILD = false; + public const BASE_VERSION = "4.16.1"; + public const IS_DEVELOPMENT_BUILD = true; public const BUILD_CHANNEL = "stable"; private function __construct(){