mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
10 KiB
10 KiB
5.33.0
Released 30th August 2025.
This is a minor feature release containing internals improvements, API improvements and new gameplay features.
Plugin compatibility: Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the pocketmine\network\mcpe or pocketmine\data namespace.
Do not update plugin minimum API versions unless you need new features added in this release.
WARNING: If your plugin uses the pocketmine\network\mcpe namespace, you're not shielded by API change constraints.
Consider using the mcpe-protocol directive in plugin.yml as a constraint if you're using packets directly.
Performance
- Worlds now remember when a chunk isn't generated. This reduces world I/O during world generation.
BlockObjectToStateSerializernow creates fewer objects in certain cases.
Gameplay
- The following blocks have been added and/or are now properly supported:
- Hanging signs
- Illager banners
Tools
generate-bedrock-data-from-packets.phpnow represents items as strings directly when only an ID is present. This significantly improves readability inBedrockDataand reduces file sizes.
API
pocketmine\block
- Added (and implemented) interfaces for many common block properties, to allow
instanceofto be used:Ageable: for blocks with age, such as cropsAnyFacing: for blocks which can face up, down, and horizontal directions (not the same asHorizontalFacing!)Colored: for blocks with 16DyeColorvariantsCoralMaterial: for coral blocks, provides access to coral type and dead/aliveHorizontalFacing: for blocks which can only face horizontal directions (not the same asAnyFacing!)Lightable: for light-source blocks which can be turned on and off, e.g. redstone lampMultiAnyFacing: for blocks which can appear in multiple faces of the same block (including up, down, and horizontal faces), e.g. glow lichenPillarRotation: for blocks which can be oriented on an axis, e.g. logsPoweredByRedstone: for blocks which receive power from a redstone component, e.g. redstone lampSignLikeRotation: for blocks which can be rotated 16 ways, e.g. signs, bannersWoodMaterial: for blocks made from wood- These interfaces have been implemented on many blocks. For the sake of brevity, they are not listed here, but you can expect to see them wherever the corresponding traits were used.
- The following classes have been added:
BaseOminousBannerCeilingCenterHangingSign- both chains connected to the same point on the block above, can face 16 directionsCeilingEdgesHangingSign- each chain connected to separate edges of the block above, can face 4 directionsOminousFloorBanner- floor version of illager banner, can face 16 directionsOminousWallBanner- wall version of illager banner, can face 4 directionsWallHangingSign- hangs from a horizontal beam, can face 4 directions
- The following API methods have been added:
public ChiseledBookshelf->setSlots(list<ChiseledBookshelfSlot> $slots) : $thispublic static VanillaBlocksmethods:ACACIA_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignACACIA_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignACACIA_WALL_HANGING_SIGN() : WallHangingSignBIRCH_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignBIRCH_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignBIRCH_WALL_HANGING_SIGN() : WallHangingSignCHERRY_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignCHERRY_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignCHERRY_WALL_HANGING_SIGN() : WallHangingSignCRIMSON_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignCRIMSON_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignCRIMSON_WALL_HANGING_SIGN() : WallHangingSignDARK_OAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignDARK_OAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignDARK_OAK_WALL_HANGING_SIGN() : WallHangingSignJUNGLE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignJUNGLE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignJUNGLE_WALL_HANGING_SIGN() : WallHangingSignMANGROVE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignMANGROVE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignMANGROVE_WALL_HANGING_SIGN() : WallHangingSignOAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignOAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignOAK_WALL_HANGING_SIGN() : WallHangingSignOMINOUS_FLOOR_BANNER() : OminousFloorBannerOMINOUS_WALL_BANNER() : OminousWallBannerPALE_OAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignPALE_OAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignPALE_OAK_WALL_HANGING_SIGN() : WallHangingSignSPRUCE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignSPRUCE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignSPRUCE_WALL_HANGING_SIGN() : WallHangingSignWARPED_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSignWARPED_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSignWARPED_WALL_HANGING_SIGN() : WallHangingSign
public AgeableTrait->getMaxAge() : int(included by all growable plant-like blocks, e.g. crops)
pocketmine\data\bedrock\block\convert
- A new system for symmetric block serializers and deserializers has been introduced.
- This allows registering both a serializer and a deserializer with the same code, meaning way less code
- It also eliminates information duplication and potential inconsistencies, improving maintainability.
- A proper way to deal with flattened IDs (e.g. color blocks) has been introduced which doesn't require hardcoding a giant mess of IDs
- This symmetric system covers 99% of blocks which have a 1:1 association between PM and vanilla blocks, or 1:N where IDs are flattened
- However, there are still some special cases which require registering separate serializers and deserializers (usually in cases where the PM implementation deviates from Mojang where Mojang's implementation sucks, such as hanging signs or big dripleaf).
- No backwards compatibility breaks are expected as a result of this change. However, it's recommended to migrate old code to this new system for maintainability.
- The following new classes have been added:
BlockSerializerDeserializerRegistrar- handles unified registration of block serializers and deserializers, based on a provided block modelFlattenedIdModel- represents a block with some properties baked into its Minecraft ID, e.g. coral or color blocksModel- represents a regular block with all properties in itsstatesNBTproperty\BoolFromStringProperty<TBlock>- property mapping a bool value from a string NBT stateproperty\BoolProperty<TBlock>property\CommonProperties- singleton containing commonly-used block property definitions and groups, e.g. facing, stair propertiesproperty\EnumFromRawStateMap<TEnum, TRaw>- maps a raw NBT value to a PHPenumand vice versaproperty\IntFromRawStateMap<TRaw>- maps a raw NBT value to PM integer constants and vice versaproperty\IntProperty<TBlock>- an integer range property with a min, max, and optional offsetproperty\Property<TBlock>- interface implemented by all property definitions accepted by aModelorFlattenedIdModelproperty\StateMap<TValue, TRaw>- interface implemented by classes accepted by mapping properties, e.g.BoolFromStringPropertyproperty\StringProperty<TBlock>- interface implemented by properties whose raw outputs are strings - these can be used as ID components inFlattenedIdModelproperty\ValueFromIntProperty<TBlock, TValue>- property mapping a generic PM value from an int NBT stateproperty\ValueFromStringProperty<TBlock, TValue>- same as above, but for a string NBT stateproperty\ValueSetFromIntProperty<TBlock, TOption>- a property mapping anint[]orenum[]from a set of flags in NBT statesproperty\ValueMappings- singleton containing commonly-neededStateMaps
- The following classes have been deprecated:
BlockStateDeserializerHelperBlockStateSerializerHelper
- The following methods have been deprecated:
- All methods for decoding mapped property types in
BlockStateReader, e.g.readFacingDirection() - All methods for encoding mapped property types in
BlockStateWriter, e.g.writeFacingDirection() - All specific blocktype mapping functions in
BlockStateToObjectDeserializer, e.g.mapStairs() - All specific blocktype mapping functions in
BlockObjectToStateSerializer, e.g.mapStairs()
- All methods for decoding mapped property types in
pocketmine\item
- The following hooks have been added:
public Item->getPlacementTransaction(Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : ?BlockTransaction- allows more complex logic for itemblocks to place blocks, without duplicating their placement conditions (used for hanging signs)
pocketmine\world
World->setChunk()now verifies that blockstate IDs in the provided chunk are all registered inRuntimeBlockStateRegistry. This should provide earlier detection for custom block registration errors by plugins.
Internals
BlockStateUpgraderis now almost entirely independent fromBlockStateData. It's anticipated that the upgrader library will be separable from the core in the future.Block->readStateFromWorld()is now triggered on chunk load for any position containing a tile. This should allow more effective updating of blocks with properties in their tiles.
5.33.1
Released 31st August 2025.
Fixes
- Fixed banners placed in prior versions getting their tiles deleted (due to missing
Typetags).
5.33.2
Released 16th September 2025.
General
- PHP 8.4 has now been added to the test matrix.
Fixes
- Fixed PHP 8.4 deprecation notice in
AsyncGeneratorExecutor. - Fixed inventory windows breaking if a window is sent while the player has the chat window open (e.g. quickly pressing E followed by / could trigger this).
- Fixed
BlockBreakEventbeing called twice in creative if cancelled. - Reduced block lag when towering and other situations where the placed block might intersect with the player's AABB. Block lag may still appear on higher latency clients - this is still being worked on.