From 66a4c4c88b1d70d2705bf32e51d80802bdc651ae Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 21 Mar 2023 00:26:19 +0000 Subject: [PATCH] Release 4.18.0-ALPHA2 --- changelogs/4.18-alpha.md | 46 ++++++++++++++++++++++++++++++++++++++++ src/VersionInfo.php | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/changelogs/4.18-alpha.md b/changelogs/4.18-alpha.md index d2c5998fc..fde35a1da 100644 --- a/changelogs/4.18-alpha.md +++ b/changelogs/4.18-alpha.md @@ -43,3 +43,49 @@ Released 16th March 2023. - `StandardPacketBroadcaster` is now locked to a single `PacketSerializer` context, reducing complexity. - Introduced `NetworkBroadcastUtils::broadcastPackets()`, replacing `Server->broadcastPackets()`. - `Server->broadcastPackets()` has been deprecated. It will be removed in a future version. + +# 4.18.0-ALPHA2 +Released 21st March 2023. + +## General +- Included more sections of the network system in Player Network Send timings. +- Changed the names of some timings to make them more user-friendly. +- Removed packet IDs from `receivePacket` and `sendPacket` timings, as they were not very useful. +- Added new specialized timers for the following: + - Item entity base ticking (merging) + - Player movement processing + - Entity movement processing (collision checking section) + - Projectile movement (all) + - Projectile movement processing (ray tracing section) + +## API +### `pocketmine\crafting` +- The following new API methods have been added: + - `CraftingManager->getCraftingRecipeIndex() : array` - returns a list of all crafting recipes + - `CraftingManager->getCraftingRecipeFromIndex(int $index) : ?CraftingRecipe` - returns the crafting recipe at the given index, or null if it doesn't exist + +### `pocketmine\inventory\transaction` +- The following API methods have changed signatures: + - `CraftingTransaction->__construct()` now accepts additional arguments `?CraftingRecipe $recipe = null, ?int $repetitions = null` +- The following new API methods have been added: + - `TransactionBuilderInventory->getActualInventory() : Inventory` - returns the actual inventory that this inventory is a proxy for + +## Internals +### Network +- Introduced support for the `ItemStackRequest` Minecraft: Bedrock network protocol. + - This fixes a large number of inventory- and crafting-related bugs. + - This also improves server security by closing off many code pathways that might have been used for exploits. `TypeConverter->netItemStackToCore()` is no longer used in server code, and remains for tool usage only. + - This system is also significantly more bandwidth-efficient and has lower overhead than the legacy system. + - This now opens the gateway to easily implement lots of gameplay features which have been missing for a long time, such as enchanting, anvils, looms, and more. + - Significant changes have been made to `pocketmine\network\mcpe\InventoryManager` internals. These shouldn't affect plugins, but may affect plugins which use internal network API. + - **No changes have been made to the plugin `InventoryTransaction` API**. + - This system has been implemented as a shim for the existing PocketMine-MP transaction system to preserve plugin compatibility. Plugins using `InventoryTransactionEvent` should continue to work seamlessly. + - The `InventoryTransaction` API will be redesigned in a future major version to make use of the new information provided by the `ItemStackRequest` system. + - `InventoryTransactionPacket` is no longer sent by the client for "regular" inventory actions. However, it is still sent when dropping items, interacting with blocks, and using items. +- Inventory slot and content syncing is now buffered until the end of the tick. This reduces outbound network usage when the client performs multiple transactions in a single tick (e.g. crafting a stack of items). +- Renamed some `InventoryManager` internal properties to make them easier to understand. +- `TypeConverter->createInventoryAction()` has been removed. +- Packet batch limit has been lowered to `100` packets. With the introduction of `ItemStackRequest`, this is more than sufficient for normal gameplay. + +### Other +- Use `Vector3::zero()` instead of `new Vector3()` in some places. \ No newline at end of file diff --git a/src/VersionInfo.php b/src/VersionInfo.php index b99f51fc9..194d834d8 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.18.0-ALPHA2"; - public const IS_DEVELOPMENT_BUILD = true; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "alpha"; private function __construct(){