Prepare alpha4 changelog

This commit is contained in:
Dylan K. Taylor 2022-09-24 15:09:33 +01:00
parent 1609b11c8e
commit 24ac543313
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -513,3 +513,97 @@ Released 14th August 2022.
- `Item->onDestroyBlock()` now accepts `array<Item> &$returnedItems` reference parameter.
- `Item->onInteractBlock()` now accepts `array<Item> &$returnedItems` reference parameter.
- `Item->onReleaseUsing()` now accepts `array<Item> &$returnedItems` reference parameter.
# 5.0.0-ALPHA4
Released 24th September 2022.
## Core
- Now targeting Minecraft: Bedrock 1.19.30.
- A new `console.enable-input` option has been added to `pocketmine.yml`, which allows disabling the console reader in environments where it's not needed (e.g. a Docker container). This can be useful to save processor and memory resources.
- Crashdumps now include JIT mode information for use by the Crash Archive.
## Internals
- Improved handling of "UI" inventories in network `InventoryManager`. Their contents are now synced correctly.
## API
### General
- Plugin dependents are now always disabled before their dependencies on shutdown, to ensure that the dependents can finish what they are doing correctly.
### `pocketmine\block`
- The following new API methods have been added:
- `public SignText->isGlowing() : bool`
- `public SignText->getBaseColor() : pocketmine\color\Color`
- The following API methods have signature changes:
- `SignText::fromBlob()` now accepts two new optional parameters: `?Color $baseColor` and `bool $glowing`
- `SignText::__construct()` now accepts two new optional parameters: `?Color $baseColor` and `bool $glowing`
- The following API methods have been removed:
- `TreeType::fromMagicNumber()`
- `TreeType->getMagicNumber()`
### `pocketmine\command`
- Command permissions are now always checked by the server when running a command.
- This only affects commands implemented by extending `Command`. Plugins using `PluginBase->onCommand()` are not affected by this change, since they already had permissions checked by the server anyway.
- Previously, direct inheritors of `Command` were responsible for checking permissions, which required developers to duplicate the same code in every command, and opened lots of potential for security vulnerabilities.
- If you want to do something on permission denied (e.g. sending a special message, or audit logging), you can do so by overriding `Command->testPermission()`, instead of baking the code directly into `Command->execute()`.
- If you don't want to use permissions at all, just create a permission with a default of `true` (or belonging to `pocketmine.group.user`) and assign that.
### `pocketmine\data`
#### Highlights
- Introduced an experimental, mostly unified item (de)serializer registrar, `ItemSerializerDeserializerRegistrar`.
- This class includes helper methods to register symmetric serializer and deserializer callbacks into an `ItemSerializer` and `ItemDeserializer`.
- This halves the amount of code needed to register new items in the vast majority of cases.
- This is currently used to register all currently implemented items.
#### Other changes
- The following classes have been renamed:
- `BlockObjectToBlockStateSerializer` -> `BlockObjectToStateSerializer`
- `BlockStateToBlockObjectDeserializer` -> `BlockStateToObjectDeserializer`
- The following classes have been removed:
- `CachingBlockStateDeserializer`
- `CachingBlockStateSerializer`
- `DelegatingBlockStateDeserializer`
- `DelegatingBlockStateSerializer`
- The following new API methods have been added:
- `public BlockStateToObjectDeserializer->mapSimple(string $stringId, \Closure() : Block $getBlock) : void` - for symmetry with the serializer
### `pocketmine\event`
- `BlockFormEvent` now includes information about the block which caused the event.
- Added `public BlockFormEvent->getCausingBlock() : Block`
### `pocketmine\inventory`
- Introduced a new `TransactionBuilder` class, which considerably simplifies the process of constructing an `InventoryTransaction` from generic `setItem()` calls.
- This is currently used to build server-side transactions for evicting the contents of the crafting grid when closing the main inventory.
- This is planned for use with the new Minecraft Bedrock item stack request system.
### `pocketmine\item`
- The following API methods have been changed:
- `Item->encodeType(RuntimeDataWriter $w) : void` -> `Item->describeType(RuntimeDataReader|RuntimeDataWriter $w) : void`
- The following new classes have been added:
- `SuspiciousStew`
- `SuspiciousStewType`
### `pocketmine\utils`
- The following new API methods have been added:
- `public static Utils::getOpcacheJitMode() : int`
### `pocketmine\world`
- The following new classes have been added:
- `sound\DyeUseSound`
- `sound\InkSacUseSound`
- The following API methods have changed signatures:
- `GlobalBlockStateHandlers::getSerializer()` now returns `BlockObjectToStateSerializer` directly instead of `BlockStateSerializer`.
- `GlobalBlockStateHandlers::getDeserializer()` now returns `BlockStateToObjectDeserializer` directly instead of `BlockStateDeserializer`.
## Gameplay
### Blocks
- Coral and coral fans now behave correctly when placed out of water (they no longer immediately die).
- Added support for dyeing sign text and making it glow.
- Fixed dead bush being able to be placed on some invalid blocks (e.g. stone).
- TNT can now be ignited by fire charges.
- Vines can now only be placed on the side of full-cube blocks.
- Fixed sugarcane not being able to be placed on some blocks.
### Items
- Added the following new items:
- Fire Charge
- Suspicious Stew