diff --git a/changelogs/5.0-alpha.md b/changelogs/5.0-alpha.md index 3e3c1340f..5b2e36234 100644 --- a/changelogs/5.0-alpha.md +++ b/changelogs/5.0-alpha.md @@ -420,3 +420,96 @@ Released 14th July 2022. - The following classes have been added: - `CopperWaxApplySound` - `CopperWaxRemoveSound` + +# 5.0.0-ALPHA3 +Released 14th August 2022. + +## Core +- Support for Bedrock 1.19.20. +- Dropped support for Bedrock versions older than 1.19.20. +- Improved performance of dropping block inventory contents when the block is destroyed. + +## Fixes +- Fixed errors when loading air itemstacks from PM4 worlds. These weren't supposed to exist (vanilla doesn't save them), but they were present in older PM worlds due to a bug in older versions. +- Fixed server crash when discovering unknown blocks in non-leveldb worlds during conversion. +- Fixed crimson / warped planks being usable as furnace fuel. + +## Gameplay +### Blocks +- Added the following new blocks: + - Cauldron + - Chorus Flower + - Chorus Plant + - Froglight (pearlescent, verdant, ochre) + - Mangrove Roots + - Muddy Mangrove Roots + - Rooted Dirt + - Spore Blossom +- Fixed lava setting entities on fire for an incorrect duration (Java vs Bedrock inconsistency). + +### Items +- Glass bottles can now be filled with water by clicking on a water source block. + +## API +### `pocketmine\block` +#### Highlights +- Introduced "type tags" concept, which allows marking certain blocks as having certain behaviours. + - The idea for this system was borrowed from the Minecraft Java tags system. + - It's still in very early concept stage, but is currently used for deciding which types of blocks plants can be placed on without needing to enumerate every single ID in every class, eliminating a bunch of boilerplate code and improving consistency. +- All `Block` descendents now accept `BlockTypeInfo` in the constructor, instead of `BlockBreakInfo`. + - This allows for future additions without needing to change dozens of overridden constructors. +- Dynamic type and state property serialization now each use a single, unified method (`describeType` and `describeState` respectively) which accept `RuntimeDataReader|RuntimeDataWriter`, instead of separate decode/encode methods. + - This simplifies implementing new blocks and avoids duplication of information. +- `&$returnedItems` reference parameter is now used in some places to enable actions to return items to players without caring about whether they are in creative or anything else. + - This eliminates boilerplate code of deciding whether to set the player's held item or not, as well as automatically dropping any overflow items that don't fit into the inventory. + - This is currently used when filling/emptying cauldrons using buckets or glass bottles. +- `BlockTypeIds` now exposes `newId()` static method to ease addition of custom blocks. + +#### Changes +- The following API methods have signature changes: + - `Block->onInteract()` now accepts `array &$returnedItems` reference parameter. + - `Block->onBreak()` now accepts `array &$returnedItems` reference parameter. + - `Block->readStateFromWorld()` now returns `Block`. + - This allows blocks to replace themselves with a different block entirely based on world conditions. +- The following new classes have been added: + - `BlockTypeInfo` + - `BlockTypeTags` +- The following new API methods have been added: + - `protected Block->describeState(RuntimeDataReader|RuntimeDataWriter $w) : void` - describes to a runtime data reader/writer how to read/write the block's state properties + - `protected Block->describeType(RuntimeDataReader|RuntimeDataWriter $w) : void` - describes to a runtime data reader/writer how to read/write the block's dynamic type properties + - `public Block->getTypeTags() : array` + - `public Block->hasTypeTag(string $tag) : bool` + - `public Spawnable->getRenderUpdateBugWorkaroundStateProperties(Block $block) : array` - allows spawnable tiles to spoof block state properties to work around client-side rendering bugs without actually changing the block server-side + - `public static BlockBreakInfo::axe(float $hardness, ?ToolTier $toolTier = null, ?float $blastResistance = null) : BlockBreakInfo` + - `public static BlockBreakInfo::pickaxe(float $hardness, ?ToolTier $toolTier = null, ?float $blastResistance = null) : BlockBreakInfo` + - `public static BlockBreakInfo::shovel(float $hardness, ?ToolTier $toolTier = null, ?float $blastResistance = null) : BlockBreakInfo` + - `public static BlockBreakInfo::tier(float $hardness, int $toolType, ToolTier $toolTier, ?float $blastResistance = null) : BlockBreakInfo` + - `public static BlockTypeIds::newId() : int` - returns a new dynamic block type ID for use by custom blocks + +### `pocketmine\data` +- The following classes have been renamed: + - `LegacyBlockStateMapper` -> `BlockIdMetaUpgrader` +- The following API methods have been added: + - `public BlockDataUpgrader->getIdMetaUpgrader() : BlockIdMetaUpgrader` + - `public BlockIdMetaUpgrader->addIdMetaToStateMapping(string $stringId, int $meta, BlockStateData $stateData) : void` + - `public BlockIdMetaUpgrader->addIntIdToStringIdMapping(int $intId, string $stringId) : void` +- The following API methods have been removed: + - `BlockIdMetaUpgrader->addMapping()` - use `addIdMetaToStateMapping()` (and `addIntIdToStringIdMapping()` if necessary) instead +- `LegacyToStringMap` no longer throws exceptions when adding the same mapping twice if the addition would have no effect. + +### `pocketmine\item` +#### Highlights +- `&$returnedItems` reference parameter is now used in some places to enable actions to return items to players without caring about whether they are in creative or anything else. + - This eliminates boilerplate code of deciding whether to set the player's held item or not, as well as automatically dropping any overflow items that don't fit into the inventory. + - This is used for things like filling/emptying buckets and bottles, and equipping armor. + +#### Changes +- The following new API methods have been added: + - `public Armor->clearCustomColor() : $this` - clears the custom color of an armor item + - `public static ItemTypeIds::newId() : int` - returns a new dynamic item type ID for use by custom items +- The following API methods have signature changes: + - `Item->onAttackEntity()` now accepts `array &$returnedItems` reference parameter. + - `Item->onClickAir()` now accepts `array &$returnedItems` reference parameter. + - `Item->onDestroyBlock()` now accepts `array &$returnedItems` reference parameter. + - `Item->onInteractBlock()` now accepts `array &$returnedItems` reference parameter. + - `Item->onReleaseUsing()` now accepts `array &$returnedItems` reference parameter. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index d06ebbdd9..deb4ef9b9 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 = "5.0.0-ALPHA3"; - public const IS_DEVELOPMENT_BUILD = true; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "alpha"; private function __construct(){