mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
9.9 KiB
9.9 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.
BlockObjectToStateSerializer
now 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.php
now represents items as strings directly when only an ID is present. This significantly improves readability inBedrockData
and reduces file sizes.
API
pocketmine\block
- Added (and implemented) interfaces for many common block properties, to allow
instanceof
to 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 16DyeColor
variantsCoralMaterial
: 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:
BaseOminousBanner
CeilingCenterHangingSign
- 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) : $this
public static VanillaBlocks
methods:ACACIA_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
ACACIA_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
ACACIA_WALL_HANGING_SIGN() : WallHangingSign
BIRCH_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
BIRCH_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
BIRCH_WALL_HANGING_SIGN() : WallHangingSign
CHERRY_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
CHERRY_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
CHERRY_WALL_HANGING_SIGN() : WallHangingSign
CRIMSON_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
CRIMSON_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
CRIMSON_WALL_HANGING_SIGN() : WallHangingSign
DARK_OAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
DARK_OAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
DARK_OAK_WALL_HANGING_SIGN() : WallHangingSign
JUNGLE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
JUNGLE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
JUNGLE_WALL_HANGING_SIGN() : WallHangingSign
MANGROVE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
MANGROVE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
MANGROVE_WALL_HANGING_SIGN() : WallHangingSign
OAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
OAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
OAK_WALL_HANGING_SIGN() : WallHangingSign
OMINOUS_FLOOR_BANNER() : OminousFloorBanner
OMINOUS_WALL_BANNER() : OminousWallBanner
PALE_OAK_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
PALE_OAK_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
PALE_OAK_WALL_HANGING_SIGN() : WallHangingSign
SPRUCE_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
SPRUCE_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
SPRUCE_WALL_HANGING_SIGN() : WallHangingSign
WARPED_CEILING_CENTER_HANGING_SIGN() : CeilingCenterHangingSign
WARPED_CEILING_EDGES_HANGING_SIGN() : CeilingEdgesHangingSign
WARPED_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 itsstates
NBTproperty\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 PHPenum
and 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 aModel
orFlattenedIdModel
property\StateMap<TValue, TRaw>
- interface implemented by classes accepted by mapping properties, e.g.BoolFromStringProperty
property\StringProperty<TBlock>
- interface implemented by properties whose raw outputs are strings - these can be used as ID components inFlattenedIdModel
property\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-neededStateMap
s
- The following classes have been deprecated:
BlockStateDeserializerHelper
BlockStateSerializerHelper
- 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
BlockStateUpgrader
is 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
Type
tags).