12 KiB
For Minecraft: Bedrock Edition 1.19.62
5.0.0 is a major update to PocketMine-MP, including many new features and API changes. It is not compatible with plugins written for previous versions of PocketMine-MP.
During the beta phase, no new features will be added.
This stage of development is focused on stability and cleaning up any major issues introduced during the alpha stage.
WARNING
This is a BETA release. This means that it may be unstable, and is not yet ready for production use.
Since this version has undergone substantial changes compared to 4.x, plugins written for 4.x will need to be updated to work on this version.
Breaking API changes may still occur during the beta phase, but only if they are strictly necessary to fix a problem prior to full release.
BACK UP your data before testing this. This version will work with worlds and player data from 4.x, BUT any world or player data loaded in 5.0.0 will not work in 4.x due to backwards-incompatible storage format changes.
5.0.0-BETA1
Released 7th March 2023.
This release includes changes from the following releases:
API
pocketmine\block
- Improved documentation for the following methods:
Block->getTypeId()
Block->getStateId()
Block->describeType()
Block->describeState()
pocketmine\command
- The following API methods have been renamed:
Command->getPermission()
->Command->getPermissions()
Internals
- The following methods have been renamed:
Block->computeStateData()
->Block->computeTypeAndStateData()
Block->decodeStateData()
->Block->decodeTypeAndStateData()
- Wall state data now packs connections into 7 bits instead of 8.
5.0.0-BETA2
Released 11th April 2023.
This release includes changes from the following releases:
Tools
- Added script
tools/generate-bedrock-data-from-packets.php
. This tool accepts a txt file containing base64-encoded packet dumps.- This script has been used to generate data for BedrockData for several years, but has only now been open-sourced.
- It's used to generate data such as crafting recipes, creative inventory data, and various other blobs of data needed to support the current version of Minecraft: Bedrock Edition.
Gameplay
- Anvils now damage entities when they fall on top of them.
API
pocketmine\block\utils
- The following API interface requirements have been added (BC breaking):
public Fallable->getFallDamagePerBlock() : float
(default implementation provided byFallableTrait
)public Fallable->getMaxFallDamage() : float
(default implementation provided byFallableTrait
)
pocketmine\data\bedrock\block
- The following new API methods have been added:
public BlockStateData->getVersionAsString() : string
pocketmine\data\bedrock\block\upgrade\model
BlockStateUpgradeSchemaModelBlockRemap
now acceptsnull
foroldState
andnewState
. This makes it easier to generate portable schemas for other languages to read.
pocketmine\event\entity
- The following new API constants have been added:
EntityDamageEvent::CAUSE_FALLING_BLOCK
EntityDamageEvent::MODIFIER_ARMOR_HELMET
pocketmine\item
- The following API methods have signature changes:
ItemTypeIds::toBlockTypeId()
may now returnnull
if the item type ID is not a block.
pocketmine\player
- The following classes have been removed:
PlayerChunkLoader
- deprecated in 4.19.0 (this was technically internal, but never marked as such)
Internals
- Make use of
Item->canStackWith()
instead ofItem->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:
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
inremappedStates
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 forRuntimeBlockStateRegistry
)
- The following API methods have signature changes:
Sapling::__construct()
now acceptsSaplingType $saplingType
instead ofTreeType $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 topocketmine\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 IDpublic ItemIdMetaUpgradeSchema->getRenamedIds() : array<string, string>
- returns a map of old ID -> new IDpublic 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, ornull
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 newBoatType
enum instead ofTreeType
. 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 acceptsBoatType $boatType
instead ofTreeType $woodType
.
- The following API methods have been removed:
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 toBlockTranslator
.- Singletons in the
pocketmine\network\mcpe\convert
package have been centralized underTypeConverter
. 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.
5.0.0-BETA4
Released 23rd May 2023.
General
ext-pmmpthread
version 6.0.0 (renamed fromext-pthreads
) is now required. This version has API changes compared to pthreads v5. Please read the linked changelog for details.pocketmine/snooze
version 0.5.0 is now required.pocketmine/classloader
andpocketmine/log-pthreads
packages have been removed. The relevant classes from these packages are now included in-house in thepocketmine/thread
namespace.BaseClassLoader
is replaced withpocketmine\thread\ThreadSafeClassLoader
ThreadedLogger
is replaced bypocketmine\thread\ThreadSafeLogger
AttachableThreadedLogger
is replaced bypocketmine\thread\AttachableThreadSafeLogger
ThreadedLoggerAttachment
is replaced bypocketmine\thread\ThreadSafeLoggerAttachment
Fixes
- Fixed crash on unknown blocks due to late initialization of properties in
UnknownBlock
.
API changes
pocketmine\scheduler
AsyncTask->setResult()
now works with thread-safe objects. This was previously not possible due to limitations in thepthreads
extension.