From c085bf0db4c7df5ac8ae2575d880f44a82ffef82 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 20 Apr 2022 13:59:50 +0100 Subject: [PATCH] Changes for 1.18.30 --- composer.json | 4 +-- composer.lock | 30 +++++++++---------- src/entity/Human.php | 2 ++ .../mcpe/serializer/ChunkSerializer.php | 2 +- src/world/particle/FloatingTextParticle.php | 2 ++ 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index eec8fa3c8..085d3d536 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,8 @@ "adhocore/json-comment": "^1.1", "fgrosse/phpasn1": "^2.3", "netresearch/jsonmapper": "^4.0", - "pocketmine/bedrock-data": "~1.6.0+bedrock-1.18.10", - "pocketmine/bedrock-protocol": "~8.0.2+bedrock-1.18.10", + "pocketmine/bedrock-data": "~1.7.0+bedrock-1.18.30", + "pocketmine/bedrock-protocol": "~9.0.0+bedrock-1.18.30", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/classloader": "^0.2.0", diff --git a/composer.lock b/composer.lock index 52285f2d5..b38a0c0cb 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": "b20ae069f5f467084bcbaae90c893bc9", + "content-hash": "bc9cfcfe04209226c67d903f77cb1620", "packages": [ { "name": "adhocore/json-comment", @@ -249,42 +249,42 @@ }, { "name": "pocketmine/bedrock-data", - "version": "1.6.0+bedrock-1.18.10", + "version": "1.7.0+bedrock-1.18.30", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockData.git", - "reference": "e98c511584a7bd58a95986374d2df4b04c6a2ba0" + "reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/e98c511584a7bd58a95986374d2df4b04c6a2ba0", - "reference": "e98c511584a7bd58a95986374d2df4b04c6a2ba0", + "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/c8f323ff0cbdb36a5d95e7e4a23969f562445be0", + "reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0", "shasum": "" }, "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "CC0-1.0" ], "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.18.10" + "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.18.30" }, - "time": "2022-02-08T19:13:47+00:00" + "time": "2022-04-20T12:40:59+00:00" }, { "name": "pocketmine/bedrock-protocol", - "version": "8.0.2+bedrock-1.18.10", + "version": "9.0.0+bedrock-1.18.30", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "d1f1afdbb4ea61ea52eb511a79ee1ca561da349c" + "reference": "76cf00af0070dbb3f63a3e7fe74039d011a5475e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/d1f1afdbb4ea61ea52eb511a79ee1ca561da349c", - "reference": "d1f1afdbb4ea61ea52eb511a79ee1ca561da349c", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/76cf00af0070dbb3f63a3e7fe74039d011a5475e", + "reference": "76cf00af0070dbb3f63a3e7fe74039d011a5475e", "shasum": "" }, "require": { @@ -298,7 +298,7 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.5.3", + "phpstan/phpstan": "1.5.4", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0", "phpunit/phpunit": "^9.5" @@ -316,9 +316,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/8.0.2+bedrock-1.18.10" + "source": "https://github.com/pmmp/BedrockProtocol/tree/9.0.0+bedrock-1.18.30" }, - "time": "2022-04-01T21:55:10+00:00" + "time": "2022-04-20T12:44:11+00:00" }, { "name": "pocketmine/binaryutils", diff --git a/src/entity/Human.php b/src/entity/Human.php index 56da6570e..a5673eae6 100644 --- a/src/entity/Human.php +++ b/src/entity/Human.php @@ -55,6 +55,7 @@ use pocketmine\network\mcpe\protocol\types\DeviceOS; use pocketmine\network\mcpe\protocol\types\entity\EntityIds; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; use pocketmine\network\mcpe\protocol\types\entity\StringMetadataProperty; +use pocketmine\network\mcpe\protocol\types\GameMode; use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper; use pocketmine\network\mcpe\protocol\types\PlayerListEntry; use pocketmine\player\Player; @@ -473,6 +474,7 @@ class Human extends Living implements ProjectileSource, InventoryHolder{ $this->location->yaw, $this->location->yaw, //TODO: head yaw ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet($this->getInventory()->getItemInHand())), + GameMode::SURVIVAL, $this->getAllNetworkData(), AdventureSettingsPacket::create(0, 0, 0, 0, 0, $this->getId()), //TODO [], //TODO: entity links diff --git a/src/network/mcpe/serializer/ChunkSerializer.php b/src/network/mcpe/serializer/ChunkSerializer.php index 0fe5d891a..06e60cb40 100644 --- a/src/network/mcpe/serializer/ChunkSerializer.php +++ b/src/network/mcpe/serializer/ChunkSerializer.php @@ -78,7 +78,7 @@ final class ChunkSerializer{ //TODO: right now we don't support 3D natively, so we just 3Dify our 2D biomes so they fill the column $encodedBiomePalette = self::serializeBiomesAsPalette($chunk); - $stream->put(str_repeat($encodedBiomePalette, 25)); + $stream->put(str_repeat($encodedBiomePalette, 24)); $stream->putByte(0); //border block array count //Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client. diff --git a/src/world/particle/FloatingTextParticle.php b/src/world/particle/FloatingTextParticle.php index 1fe3ee008..a8358ce81 100644 --- a/src/world/particle/FloatingTextParticle.php +++ b/src/world/particle/FloatingTextParticle.php @@ -36,6 +36,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; use pocketmine\network\mcpe\protocol\types\entity\FloatMetadataProperty; use pocketmine\network\mcpe\protocol\types\entity\LongMetadataProperty; +use pocketmine\network\mcpe\protocol\types\GameMode; use pocketmine\network\mcpe\protocol\types\inventory\ItemStack; use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper; use pocketmine\network\mcpe\protocol\types\PlayerListEntry; @@ -117,6 +118,7 @@ class FloatingTextParticle implements Particle{ 0, 0, ItemStackWrapper::legacy(ItemStack::null()), + GameMode::SURVIVAL, $actorMetadata, AdventureSettingsPacket::create(0, 0, 0, 0, 0, $this->entityId), [],