Release 5.0.0-BETA3

This commit is contained in:
Dylan K. Taylor 2023-05-17 19:47:42 +01:00
parent 7ac74180c9
commit b8abe34904
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 102 additions and 1 deletions

View File

@ -93,3 +93,104 @@ Released 11th April 2023.
## Internals
- Make use of `Item->canStackWith()` instead of `Item->equals()` wherever possible, to make the code more readable.
# 5.0.0-BETA3
Released 17th May 2023.
**This release includes changes from the following releases:**
- [4.19.1](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.19.md#4191)
- [4.19.2](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.19.md#4192)
- [4.19.3](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.19.md#4193)
- [4.20.0](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.20.md#4200)
- [4.20.1](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.20.md#4201)
- [4.20.2](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.20.md#4202)
- [4.20.3](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.20.md#4203)
- [4.20.4](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.20.md#4204)
- [4.21.0](https://github.com/pmmp/PocketMine-MP/blob/5.0.0-BETA3/changelogs/4.21.md#4210)
## General
- Improved light propagation performance by 10-15%.
## Fixes
- Fixed late initialization of coral type in `BaseCoral`.
## Tools
- `tools/generate-blockstate-upgrade-schema.php` has the following improvements:
- Now generates better errors when inconsistent blockstate versions are encountered.
- Now generates more stable outputs when re-run on the same input.
- Output now uses `copiedState` in `remappedStates` where possible. This significantly reduces the size of the output for blocks with partially flattened states.
## Gameplay
- The following blocks have been added:
- Cave Vines
- The following items have been added:
- Glow Berries
- Mangrove Boat (incomplete)
- Fixed flower pots being able to be placed inside flower pots.
## API
### `pocketmine\block`
- The following API methods have been renamed:
- `Block->isSameType()` -> `Block->hasSameTypeId()`
- `Block->describeType()` -> `Block->describeBlockItemState()`
- `Block->describeState()` -> `Block->describeBlockOnlyState()`
- The following API methods have been removed:
- `Block->getRequiredTypeDataBits()`
- `Block->getRequiredStateDataBits()`
- The following API methods have been added:
- `public Block->generateStatePermutations() : \Generator<int, Block, void, void>` - yields all possible states this block type can be in (used for `RuntimeBlockStateRegistry`)
- The following API methods have signature changes:
- `Sapling::__construct()` now accepts `SaplingType $saplingType` instead of `TreeType $treeType`
- `RuntimeBlockStateRegistry->register()` no longer accepts an `$override` parameter.
- The following classes have been added:
- `utils\SaplingType` - enum of all sapling types
- `utils\TreeType` has been moved to `pocketmine\world\generator\object` namespace.
### `pocketmine\data\bedrock\item\upgrade`
- The following API methods have been added:
- `public ItemIdMetaUpgrader->getSchemas() : array<int, BlockStateUpgradeSchema>` - returns a list of loaded schemas indexed by schema ID
- `public ItemIdMetaUpgradeSchema->getRenamedIds() : array<string, string>` - returns a map of old ID -> new ID
- `public ItemIdMetaUpgradeSchema->getRemappedMetas() : array<string, array<int, string>>` - returns a map of old ID -> list of old meta -> new ID
### `pocketmine\event\block`
- The following API methods have been added:
- `public BlockGrowEvent->getPlayer() : ?Player` - returns the player that triggered the block growth, or `null` if it was not triggered by a player
- The following API methods have signature changes:
- `BlockGrowEvent::__construct()` now accepts an optional `?Player $player` parameter.
### `pocketmine\event\world`
- The following classes have been added:
- `WorldDisplayNameChangeEvent` - called when a world's display name is changed
### `pocketmine\item`
- `Boat` now uses a new `BoatType` enum instead of `TreeType`. This is because not all tree types have an associated boat type, and some boat types are not made from tree materials (e.g. bamboo raft).
- The following API methods have been removed:
- `Boat->getWoodType()`
- The following API methods have been added:
- `public Boat->getType() : BoatType`
- `public Item->getStateId() : int` - returns an encoded ID containing the item type ID and encoded item state
- The following API methods have been renamed:
- `Item->describeType()` -> `Item->describeState()`
- The following classes have been added:
- `BoatType` - enum of all boat types
- The following API methods have signature changes:
- `BoatType::__construct()` now accepts `BoatType $boatType` instead of `TreeType $woodType`.
### `pocketmine\world`
- The following API methods have been added:
- `public World->setDisplayName(string $name) : void`
### `pocketmine\world\format`
- Fixed outdated documentation for various methods of `Chunk`.
### `pocketmine\world\format\io\data`
- The following API interface requirements have been added:
- `public WorldData->setDisplayName(string $value) : void`
## Internals
- Reduced global usage in world providers. In the future, we want to have blockstate deserializers etc. injected rather than being global singletons.
- `BlockStateUpgrader` now always updates the blockstate version, even if no changes were made. PM itself doesn't require this, but it's useful for tools to know whether to upgrade the data again (e.g. in testing scenarios).
- `BlockStateDictionary` memory usage is now reduced from 9 MB to 3.5 MB using various techniques, including string reuse and binary-encoded states.
- `RuntimeBlockMapping` has been renamed to `BlockTranslator`.
- Singletons in the `pocketmine\network\mcpe\convert` package have been centralized under `TypeConverter`. In the future, this will be injected where needed, allowing different converters to be used for different sessions (useful for multiversion).
- Overriding of serializers and deserializers of items and blocks is now consistently disallowed. Due to the lack of a good reason to allow overriding built-in blocks and items, this is no longer allowed.

View File

@ -32,7 +32,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.0.0-BETA3";
public const IS_DEVELOPMENT_BUILD = true;
public const IS_DEVELOPMENT_BUILD = false;
public const BUILD_CHANNEL = "beta";
private function __construct(){