From 89deb0fe18f86d83a1d190682b60ae72da9cfe0c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 11 Apr 2023 22:48:02 +0100 Subject: [PATCH] Release 4.19.0 --- changelogs/4.19.md | 77 +++++++++++++++++++++++++++++++++++++++++++++ src/VersionInfo.php | 4 +-- 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 changelogs/4.19.md diff --git a/changelogs/4.19.md b/changelogs/4.19.md new file mode 100644 index 000000000..de5da5340 --- /dev/null +++ b/changelogs/4.19.md @@ -0,0 +1,77 @@ +**For Minecraft: Bedrock Edition 1.19.70** + +### Note about API versions +Plugins which don't touch the `pocketmine\network\mcpe` namespace are 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 `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.** +Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly. + +### Highlights +This version introduces support for a new, more advanced version of Timings. +This improved system provides more detail than the old system, and supports being displayed in a tree view, making it much easier to see which timers contribute to which other timers. + +In addition, some minor performance improvements have been made, along with a couple of minor API additions. + +# 4.19.0 +Released 11th April 2023. + +## General +- Updated the Timings system. + - Timings records now include parent information, allowing them to be displayed in a tree view (e.g. https://timings.pmmp.io/?id=303556). + - Timings records now include additional information, such as Peak (max time spent on any single tick), and Ticks (number of ticks the timer was active on). + - New timings have been added for every event. + - A new timer `Player Network Send - Pre-Spawn Game Data` has been added, and covers most of the time spent handling `ResourcePackClientResponsePacket`, giving a clearer picture of what's happening. +- Improved performance of the plugin event system. + - By introducing some caching, the event system now has 90% less overhead than in previous versions. +- Improved performance of the random chunk ticking system. + - The selection of ticked random chunks, and their validation for ticking, is now cached. This significantly reduces the overhead of chunk selection. + - Factions servers and other game modes with big maps and sparsely populated areas will see the most benefit from this change. + - Real-world performance benefit of this change is anywhere from 0-20%, depending on server type and configuration. +- The `timings paste` command now logs a debug message with the server response on failure to paste a timings report. + +## API +### `pocketmine\entity\object` +- The following API constants have been added: + - `ExperienceOrb::DEFAULT_DESPAWN_DELAY` - the default delay in ticks before an experience orb despawns + - `ExperienceOrb::NEVER_DESPAWN` - magic value for `setDespawnDelay()` to make an experience orb never despawn + - `ExperienceOrb::MAX_DESPAWN_DELAY` - the maximum delay in ticks before an experience orb despawns +- The following API methods have been added: + - `public ExperienceOrb->getDespawnDelay() : int` - returns the delay in ticks before this experience orb despawns + - `public ExperienceOrb->setDespawnDelay(int $despawnDelay) : void` - sets the delay in ticks before this experience orb despawns +- The following properties have been deprecated + - `ExperienceOrb->age` - superseded by despawn delay methods + +### `pocketmine\event` +- The following API methods have been added: + - `public HandlerList->getListenerList() : list` - returns an ordered list of handlers to be called for the event + +### `pocketmine\player` +- The following API methods have behavioural changes: + - `ChunkSelector->selectChunks()` now yields the distance in chunks from the center as the key, instead of an incrementing integer. +- The following classes have been deprecated: + - `PlayerChunkLoader` (this was technically internal, but never marked as such) + +### `pocketmine\timings` +- The following API constants have been deprecated: +- `Timings::INCLUDED_BY_OTHER_TIMINGS_PREFIX` - this is superseded by timings group support (see `Timings::GROUP_BREAKDOWN`) +- The following API constants have been added: +- `Timings::GROUP_BREAKDOWN` - this group makes a timer appear in the `Minecraft - Breakdown` section of a timings report +- The following API methods have been added: +- `public TimingsHandler->getGroup() : string` - returns the name of the table in which this timer will appear in a timings report +- The following API methods have changed signatures: +- `TimingsHandler->__construct()` now accepts an additional, optional `string $group` parameter, which defaults to `Minecraft`. + +### `pocketmine\world` +#### Highlights +Ticking chunks is now done using the `ChunkTicker` system, which has a much more fine-grained API than the old `TickingChunkLoader` system, as well as better performance. +It works similarly to the `ChunkLoader` system, in that chunks will be ticked as long as at least one `ChunkTicker` is registered for them. + +#### API changes +- The following classes have been deprecated: + - `TickingChunkLoader` - this has been superseded by the more powerful and performant `ChunkTicker` APIs +- The following classes have been added: + - `ChunkTicker` - an opaque object used for `registerTickingChunk()` to instruct the `World` that we want a chunk to be ticked +- The following API methods have been added: + - `public World->registerTickingChunk(ChunkTicker $ticker, int $chunkX, int $chunkZ) : void` - registers a chunk to be ticked by the given `ChunkTicker` + - `public World->unregisterTickingChunk(ChunkTicker $ticker, int $chunkX, int $chunkZ) : void` - unregisters a chunk from being ticked by the given `ChunkTicker` diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 723613b39..2624370f0 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.18.5"; - public const IS_DEVELOPMENT_BUILD = true; + public const BASE_VERSION = "4.19.0"; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; private function __construct(){