From 687112f4cd5cf5ff6fe591495040c86b476bfeda Mon Sep 17 00:00:00 2001 From: Dries C Date: Thu, 27 Mar 2025 16:48:19 +0100 Subject: [PATCH 1/2] 5.27.0, Bedrock 1.21.70 support (#6665) Co-authored-by: Dylan K. Taylor --- changelogs/5.27.md | 18 ++++++++++++ composer.json | 4 +-- composer.lock | 28 +++++++++---------- src/VersionInfo.php | 4 +-- src/data/bedrock/block/BlockStateData.php | 4 +-- src/data/bedrock/block/BlockTypeNames.php | 7 +++++ src/data/bedrock/item/ItemTypeNames.php | 2 ++ .../mcpe/handler/InGamePacketHandler.php | 5 ---- src/world/format/io/data/BedrockWorldData.php | 6 ++-- src/world/sound/EntityAttackNoDamageSound.php | 3 +- src/world/sound/EntityAttackSound.php | 3 +- src/world/sound/EntityLandSound.php | 3 +- src/world/sound/EntityLongFallSound.php | 3 +- src/world/sound/EntityShortFallSound.php | 3 +- src/world/sound/ThrowSound.php | 2 +- src/world/sound/WaterSplashSound.php | 3 +- 16 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 changelogs/5.27.md diff --git a/changelogs/5.27.md b/changelogs/5.27.md new file mode 100644 index 000000000..f3923d466 --- /dev/null +++ b/changelogs/5.27.md @@ -0,0 +1,18 @@ +# 5.27.0 +Released 27th March 2025. + +This is a support release for Minecraft: Bedrock Edition 1.21.70. + +**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. + +## Interim releases +If you're upgrading from 5.25.x directly to 5.27.0, please also read the following changelogs, as the interim releases contain important changes: +- [5.26.0](https://github.com/pmmp/PocketMine-MP/blob/5.26.0/changelogs/5.26.md#5260) - Performance improvements and other internal improvements + +## General +- Aded support for Minecraft: Bedrock Edition 1.21.70. +- Removed support for earlier versions. diff --git a/composer.json b/composer.json index 74441af76..8da46090b 100644 --- a/composer.json +++ b/composer.json @@ -34,9 +34,9 @@ "adhocore/json-comment": "~1.2.0", "netresearch/jsonmapper": "~v5.0.0", "pocketmine/bedrock-block-upgrade-schema": "~5.1.0+bedrock-1.21.60", - "pocketmine/bedrock-data": "~4.0.0+bedrock-1.21.60", + "pocketmine/bedrock-data": "~4.1.0+bedrock-1.21.70", "pocketmine/bedrock-item-upgrade-schema": "~1.14.0+bedrock-1.21.50", - "pocketmine/bedrock-protocol": "~36.2.0+bedrock-1.21.60", + "pocketmine/bedrock-protocol": "~37.0.0+bedrock-1.21.70", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/color": "^0.3.0", diff --git a/composer.lock b/composer.lock index b8c45c248..405a92414 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6314ae9a7919042f10bd17f0a3ef6e9d", + "content-hash": "28b4de9a23a293646dbad2707cdfd9e0", "packages": [ { "name": "adhocore/json-comment", @@ -204,16 +204,16 @@ }, { "name": "pocketmine/bedrock-data", - "version": "4.0.0+bedrock-1.21.60", + "version": "4.1.0+bedrock-1.21.70", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockData.git", - "reference": "2e5f16ec2facac653f3f894f22eb831d880ba98e" + "reference": "d53fe98cb3b596ac016e275df5bd5e89b04a4817" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/2e5f16ec2facac653f3f894f22eb831d880ba98e", - "reference": "2e5f16ec2facac653f3f894f22eb831d880ba98e", + "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/d53fe98cb3b596ac016e275df5bd5e89b04a4817", + "reference": "d53fe98cb3b596ac016e275df5bd5e89b04a4817", "shasum": "" }, "type": "library", @@ -224,9 +224,9 @@ "description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/BedrockData/issues", - "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.21.60" + "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.21.70" }, - "time": "2025-02-16T15:56:56+00:00" + "time": "2025-03-25T19:43:31+00:00" }, { "name": "pocketmine/bedrock-item-upgrade-schema", @@ -256,16 +256,16 @@ }, { "name": "pocketmine/bedrock-protocol", - "version": "36.2.0+bedrock-1.21.60", + "version": "37.0.0+bedrock-1.21.70", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "6830e8a9ee9ecb6984b7b02f412473136ae92d50" + "reference": "7091dad2c12ed4a4106432df21fc698960c6be9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/6830e8a9ee9ecb6984b7b02f412473136ae92d50", - "reference": "6830e8a9ee9ecb6984b7b02f412473136ae92d50", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/7091dad2c12ed4a4106432df21fc698960c6be9e", + "reference": "7091dad2c12ed4a4106432df21fc698960c6be9e", "shasum": "" }, "require": { @@ -296,9 +296,9 @@ "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", "support": { "issues": "https://github.com/pmmp/BedrockProtocol/issues", - "source": "https://github.com/pmmp/BedrockProtocol/tree/36.2.0+bedrock-1.21.60" + "source": "https://github.com/pmmp/BedrockProtocol/tree/37.0.0+bedrock-1.21.70" }, - "time": "2025-03-14T17:17:21+00:00" + "time": "2025-03-27T15:19:36+00:00" }, { "name": "pocketmine/binaryutils", @@ -2954,5 +2954,5 @@ "platform-overrides": { "php": "8.1.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 8b9b68faf..a51a077ac 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,8 +31,8 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "5.26.1"; - public const IS_DEVELOPMENT_BUILD = true; + public const BASE_VERSION = "5.27.0"; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; /** diff --git a/src/data/bedrock/block/BlockStateData.php b/src/data/bedrock/block/BlockStateData.php index e90410ac7..600eba938 100644 --- a/src/data/bedrock/block/BlockStateData.php +++ b/src/data/bedrock/block/BlockStateData.php @@ -45,8 +45,8 @@ final class BlockStateData{ public const CURRENT_VERSION = (1 << 24) | //major (21 << 16) | //minor - (60 << 8) | //patch - (33); //revision + (70 << 8) | //patch + (1); //revision public const TAG_NAME = "name"; public const TAG_STATES = "states"; diff --git a/src/data/bedrock/block/BlockTypeNames.php b/src/data/bedrock/block/BlockTypeNames.php index eec1ab8d1..bc30800fc 100644 --- a/src/data/bedrock/block/BlockTypeNames.php +++ b/src/data/bedrock/block/BlockTypeNames.php @@ -175,7 +175,9 @@ final class BlockTypeNames{ public const BUBBLE_CORAL_FAN = "minecraft:bubble_coral_fan"; public const BUBBLE_CORAL_WALL_FAN = "minecraft:bubble_coral_wall_fan"; public const BUDDING_AMETHYST = "minecraft:budding_amethyst"; + public const BUSH = "minecraft:bush"; public const CACTUS = "minecraft:cactus"; + public const CACTUS_FLOWER = "minecraft:cactus_flower"; public const CAKE = "minecraft:cake"; public const CALCITE = "minecraft:calcite"; public const CALIBRATED_SCULK_SENSOR = "minecraft:calibrated_sculk_sensor"; @@ -545,6 +547,7 @@ final class BlockTypeNames{ public const FIRE_CORAL_BLOCK = "minecraft:fire_coral_block"; public const FIRE_CORAL_FAN = "minecraft:fire_coral_fan"; public const FIRE_CORAL_WALL_FAN = "minecraft:fire_coral_wall_fan"; + public const FIREFLY_BUSH = "minecraft:firefly_bush"; public const FLETCHING_TABLE = "minecraft:fletching_table"; public const FLOWER_POT = "minecraft:flower_pot"; public const FLOWERING_AZALEA = "minecraft:flowering_azalea"; @@ -685,6 +688,7 @@ final class BlockTypeNames{ public const LARGE_AMETHYST_BUD = "minecraft:large_amethyst_bud"; public const LARGE_FERN = "minecraft:large_fern"; public const LAVA = "minecraft:lava"; + public const LEAF_LITTER = "minecraft:leaf_litter"; public const LECTERN = "minecraft:lectern"; public const LEVER = "minecraft:lever"; public const LIGHT_BLOCK_0 = "minecraft:light_block_0"; @@ -1043,6 +1047,7 @@ final class BlockTypeNames{ public const SEA_LANTERN = "minecraft:sea_lantern"; public const SEA_PICKLE = "minecraft:sea_pickle"; public const SEAGRASS = "minecraft:seagrass"; + public const SHORT_DRY_GRASS = "minecraft:short_dry_grass"; public const SHORT_GRASS = "minecraft:short_grass"; public const SHROOMLIGHT = "minecraft:shroomlight"; public const SILVER_GLAZED_TERRACOTTA = "minecraft:silver_glazed_terracotta"; @@ -1140,6 +1145,7 @@ final class BlockTypeNames{ public const SUSPICIOUS_GRAVEL = "minecraft:suspicious_gravel"; public const SUSPICIOUS_SAND = "minecraft:suspicious_sand"; public const SWEET_BERRY_BUSH = "minecraft:sweet_berry_bush"; + public const TALL_DRY_GRASS = "minecraft:tall_dry_grass"; public const TALL_GRASS = "minecraft:tall_grass"; public const TARGET = "minecraft:target"; public const TINTED_GLASS = "minecraft:tinted_glass"; @@ -1267,6 +1273,7 @@ final class BlockTypeNames{ public const WHITE_TERRACOTTA = "minecraft:white_terracotta"; public const WHITE_TULIP = "minecraft:white_tulip"; public const WHITE_WOOL = "minecraft:white_wool"; + public const WILDFLOWERS = "minecraft:wildflowers"; public const WITHER_ROSE = "minecraft:wither_rose"; public const WITHER_SKELETON_SKULL = "minecraft:wither_skeleton_skull"; public const WOODEN_BUTTON = "minecraft:wooden_button"; diff --git a/src/data/bedrock/item/ItemTypeNames.php b/src/data/bedrock/item/ItemTypeNames.php index b0d49fc31..ea95d57f0 100644 --- a/src/data/bedrock/item/ItemTypeNames.php +++ b/src/data/bedrock/item/ItemTypeNames.php @@ -75,6 +75,7 @@ final class ItemTypeNames{ public const BLEACH = "minecraft:bleach"; public const BLUE_BUNDLE = "minecraft:blue_bundle"; public const BLUE_DYE = "minecraft:blue_dye"; + public const BLUE_EGG = "minecraft:blue_egg"; public const BOARD = "minecraft:board"; public const BOAT = "minecraft:boat"; public const BOGGED_SPAWN_EGG = "minecraft:bogged_spawn_egg"; @@ -93,6 +94,7 @@ final class ItemTypeNames{ public const BRICK = "minecraft:brick"; public const BROWN_BUNDLE = "minecraft:brown_bundle"; public const BROWN_DYE = "minecraft:brown_dye"; + public const BROWN_EGG = "minecraft:brown_egg"; public const BRUSH = "minecraft:brush"; public const BUCKET = "minecraft:bucket"; public const BUNDLE = "minecraft:bundle"; diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index dba16e1e6..93a01fdcc 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -64,7 +64,6 @@ use pocketmine\network\mcpe\protocol\ItemStackResponsePacket; use pocketmine\network\mcpe\protocol\LabTablePacket; use pocketmine\network\mcpe\protocol\LecternUpdatePacket; use pocketmine\network\mcpe\protocol\LevelSoundEventPacket; -use pocketmine\network\mcpe\protocol\LevelSoundEventPacketV1; use pocketmine\network\mcpe\protocol\MapInfoRequestPacket; use pocketmine\network\mcpe\protocol\MobArmorEquipmentPacket; use pocketmine\network\mcpe\protocol\MobEquipmentPacket; @@ -296,10 +295,6 @@ class InGamePacketHandler extends PacketHandler{ return $packetHandled; } - public function handleLevelSoundEventPacketV1(LevelSoundEventPacketV1 $packet) : bool{ - return true; //useless leftover from 1.8 - } - public function handleActorEvent(ActorEventPacket $packet) : bool{ if($packet->actorRuntimeId !== $this->player->getId()){ //TODO HACK: EATING_ITEM is sent back to the server when the server sends it for other players (1.14 bug, maybe earlier) diff --git a/src/world/format/io/data/BedrockWorldData.php b/src/world/format/io/data/BedrockWorldData.php index a9ca43bc3..5b1945739 100644 --- a/src/world/format/io/data/BedrockWorldData.php +++ b/src/world/format/io/data/BedrockWorldData.php @@ -51,12 +51,12 @@ use function time; class BedrockWorldData extends BaseNbtWorldData{ public const CURRENT_STORAGE_VERSION = 10; - public const CURRENT_STORAGE_NETWORK_VERSION = 776; + public const CURRENT_STORAGE_NETWORK_VERSION = 786; public const CURRENT_CLIENT_VERSION_TARGET = [ 1, //major 21, //minor - 60, //patch - 33, //revision + 70, //patch + 3, //revision 0 //is beta ]; diff --git a/src/world/sound/EntityAttackNoDamageSound.php b/src/world/sound/EntityAttackNoDamageSound.php index 6804c668e..d46340a28 100644 --- a/src/world/sound/EntityAttackNoDamageSound.php +++ b/src/world/sound/EntityAttackNoDamageSound.php @@ -39,7 +39,8 @@ class EntityAttackNoDamageSound implements Sound{ -1, "minecraft:player", false, - false + false, + -1 )]; } } diff --git a/src/world/sound/EntityAttackSound.php b/src/world/sound/EntityAttackSound.php index bf1877444..28be1e62f 100644 --- a/src/world/sound/EntityAttackSound.php +++ b/src/world/sound/EntityAttackSound.php @@ -39,7 +39,8 @@ class EntityAttackSound implements Sound{ -1, "minecraft:player", false, - false + false, + -1 )]; } } diff --git a/src/world/sound/EntityLandSound.php b/src/world/sound/EntityLandSound.php index 998c5ed02..ef25395cf 100644 --- a/src/world/sound/EntityLandSound.php +++ b/src/world/sound/EntityLandSound.php @@ -46,7 +46,8 @@ class EntityLandSound implements Sound{ TypeConverter::getInstance()->getBlockTranslator()->internalIdToNetworkId($this->blockLandedOn->getStateId()), $this->entity::getNetworkTypeId(), false, //TODO: does isBaby have any relevance here? - false + false, + $this->entity->getId() )]; } } diff --git a/src/world/sound/EntityLongFallSound.php b/src/world/sound/EntityLongFallSound.php index e0dabe3a5..5e0186f8e 100644 --- a/src/world/sound/EntityLongFallSound.php +++ b/src/world/sound/EntityLongFallSound.php @@ -42,7 +42,8 @@ class EntityLongFallSound implements Sound{ -1, $this->entity::getNetworkTypeId(), false, //TODO: is isBaby relevant here? - false + false, + $this->entity->getId() )]; } } diff --git a/src/world/sound/EntityShortFallSound.php b/src/world/sound/EntityShortFallSound.php index 8955c3552..d230294d7 100644 --- a/src/world/sound/EntityShortFallSound.php +++ b/src/world/sound/EntityShortFallSound.php @@ -41,7 +41,8 @@ class EntityShortFallSound implements Sound{ -1, $this->entity::getNetworkTypeId(), false, //TODO: does isBaby have any relevance here? - false + false, + -1 )]; } } diff --git a/src/world/sound/ThrowSound.php b/src/world/sound/ThrowSound.php index ebf64725e..d93ac951b 100644 --- a/src/world/sound/ThrowSound.php +++ b/src/world/sound/ThrowSound.php @@ -30,6 +30,6 @@ use pocketmine\network\mcpe\protocol\types\LevelSoundEvent; class ThrowSound implements Sound{ public function encode(Vector3 $pos) : array{ - return [LevelSoundEventPacket::create(LevelSoundEvent::THROW, $pos, -1, "minecraft:player", false, false)]; + return [LevelSoundEventPacket::create(LevelSoundEvent::THROW, $pos, -1, "minecraft:player", false, false, -1)]; } } diff --git a/src/world/sound/WaterSplashSound.php b/src/world/sound/WaterSplashSound.php index f7b662ec8..b24c10e80 100644 --- a/src/world/sound/WaterSplashSound.php +++ b/src/world/sound/WaterSplashSound.php @@ -42,7 +42,8 @@ final class WaterSplashSound implements Sound{ (int) ($this->volume * 16777215), ":", false, - false + false, + -1 )]; } } From e88b81a4cbd9274aa3b6faa0b3f847c13ca0ecd5 Mon Sep 17 00:00:00 2001 From: "pmmp-admin-bot[bot]" <188621379+pmmp-admin-bot[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:49:33 +0000 Subject: [PATCH 2/2] 5.27.1 is next Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/14110940403 --- src/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VersionInfo.php b/src/VersionInfo.php index a51a077ac..0f776dc1d 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,8 +31,8 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "5.27.0"; - public const IS_DEVELOPMENT_BUILD = false; + public const BASE_VERSION = "5.27.1"; + public const IS_DEVELOPMENT_BUILD = true; public const BUILD_CHANNEL = "stable"; /**