From 0ad6429fee1e85febf6b0f24afd4ff83c240d697 Mon Sep 17 00:00:00 2001 From: Amir Muazzam Date: Mon, 13 Nov 2023 19:15:07 +0800 Subject: [PATCH 1/5] Fix RegistryTrait documentation (#6153) --- src/utils/EnumTrait.php | 2 +- src/utils/RegistryTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/EnumTrait.php b/src/utils/EnumTrait.php index ee1bd4e35..7427e69f4 100644 --- a/src/utils/EnumTrait.php +++ b/src/utils/EnumTrait.php @@ -28,7 +28,7 @@ namespace pocketmine\utils; * __callStatic(). * * Classes using this trait need to include \@method tags in their class docblock for every enum member. - * Alternatively, just put \@generate-registry-docblock in the docblock and run tools/generate-registry-annotations.php + * Alternatively, just put \@generate-registry-docblock in the docblock and run build/generate-registry-annotations.php * * @deprecated Use native PHP 8.1 enums instead. Use {@link LegacyEnumShimTrait} if you need to provide backwards * compatible EnumTrait-like API for migrated enums. diff --git a/src/utils/RegistryTrait.php b/src/utils/RegistryTrait.php index 2071f4c07..cf231bf21 100644 --- a/src/utils/RegistryTrait.php +++ b/src/utils/RegistryTrait.php @@ -33,7 +33,7 @@ use function preg_match; * These faux constants are exposed in static class methods, which are handled using __callStatic(). * * Classes using this trait need to include \@method tags in their class docblock for every faux constant. - * Alternatively, just put \@generate-registry-docblock in the docblock and run tools/generate-registry-annotations.php + * Alternatively, just put \@generate-registry-docblock in the docblock and run build/generate-registry-annotations.php */ trait RegistryTrait{ /** From 8f107e785b2ef942c35b2ef7deb71b15e1093e2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:06:23 +0000 Subject: [PATCH 2/5] Bump dessant/support-requests from 3 to 4 (#6160) Bumps [dessant/support-requests](https://github.com/dessant/support-requests) from 3 to 4. - [Release notes](https://github.com/dessant/support-requests/releases) - [Changelog](https://github.com/dessant/support-requests/blob/main/CHANGELOG.md) - [Commits](https://github.com/dessant/support-requests/compare/v3...v4) --- updated-dependencies: - dependency-name: dessant/support-requests dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/support.yml b/.github/workflows/support.yml index fe726dfef..68da365cb 100644 --- a/.github/workflows/support.yml +++ b/.github/workflows/support.yml @@ -8,7 +8,7 @@ jobs: support: runs-on: ubuntu-latest steps: - - uses: dessant/support-requests@v3 + - uses: dessant/support-requests@v4 with: github-token: ${{ github.token }} support-label: "Support request" From 886ed60e6aa6033022aa2e6ad64082024e28e99e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 09:39:26 +0000 Subject: [PATCH 3/5] Bump build/php from `3c3c483` to `19f2ee6` (#6163) Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `3c3c483` to `19f2ee6`. - [Release notes](https://github.com/pmmp/php-build-scripts/releases) - [Commits](https://github.com/pmmp/php-build-scripts/compare/3c3c483baac5cb90dff057dfff4388b1dc3f217c...19f2ee6d3356db9185d341431904cd7c1dffad8c) --- updated-dependencies: - dependency-name: build/php dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index 3c3c483ba..19f2ee6d3 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 3c3c483baac5cb90dff057dfff4388b1dc3f217c +Subproject commit 19f2ee6d3356db9185d341431904cd7c1dffad8c From 89fbb3fd0df9996ba134b871b27a313a7d430a9a Mon Sep 17 00:00:00 2001 From: ace Date: Thu, 16 Nov 2023 18:16:29 +0800 Subject: [PATCH 4/5] Fix loading of Item Frame item rotation (#6123) --- src/block/tile/ItemFrame.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/block/tile/ItemFrame.php b/src/block/tile/ItemFrame.php index faf0ddbb6..7d003770e 100644 --- a/src/block/tile/ItemFrame.php +++ b/src/block/tile/ItemFrame.php @@ -27,6 +27,7 @@ use pocketmine\item\Item; use pocketmine\item\VanillaItems; use pocketmine\math\Vector3; use pocketmine\nbt\tag\CompoundTag; +use pocketmine\nbt\tag\FloatTag; use pocketmine\network\mcpe\convert\TypeConverter; use pocketmine\world\World; @@ -52,13 +53,17 @@ class ItemFrame extends Spawnable{ if(($itemTag = $nbt->getCompoundTag(self::TAG_ITEM)) !== null){ $this->item = Item::nbtDeserialize($itemTag); } - $this->itemRotation = $nbt->getByte(self::TAG_ITEM_ROTATION, $this->itemRotation); + if($nbt->getTag(self::TAG_ITEM_ROTATION) instanceof FloatTag){ + $this->itemRotation = (int) ($nbt->getFloat(self::TAG_ITEM_ROTATION, $this->itemRotation * 45) / 45); + } else { + $this->itemRotation = $nbt->getByte(self::TAG_ITEM_ROTATION, $this->itemRotation); + } $this->itemDropChance = $nbt->getFloat(self::TAG_ITEM_DROP_CHANCE, $this->itemDropChance); } protected function writeSaveData(CompoundTag $nbt) : void{ $nbt->setFloat(self::TAG_ITEM_DROP_CHANCE, $this->itemDropChance); - $nbt->setByte(self::TAG_ITEM_ROTATION, $this->itemRotation); + $nbt->setFloat(self::TAG_ITEM_ROTATION, $this->itemRotation * 45); if(!$this->item->isNull()){ $nbt->setTag(self::TAG_ITEM, $this->item->nbtSerialize()); } @@ -98,7 +103,7 @@ class ItemFrame extends Spawnable{ protected function addAdditionalSpawnData(CompoundTag $nbt) : void{ $nbt->setFloat(self::TAG_ITEM_DROP_CHANCE, $this->itemDropChance); - $nbt->setByte(self::TAG_ITEM_ROTATION, $this->itemRotation); + $nbt->setFloat(self::TAG_ITEM_ROTATION, $this->itemRotation * 45); if(!$this->item->isNull()){ $nbt->setTag(self::TAG_ITEM, TypeConverter::getInstance()->getItemTranslator()->toNetworkNbt($this->item)); } From a25597ca304cc9ce978ae93ed89f45c3747a2031 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 17 Nov 2023 12:01:19 +0000 Subject: [PATCH 5/5] Server: updated documentation for prepareBatch() --- src/Server.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Server.php b/src/Server.php index f4d4a0958..63eee3b2a 100644 --- a/src/Server.php +++ b/src/Server.php @@ -1357,7 +1357,14 @@ class Server{ /** * @internal - * Broadcasts a list of packets in a batch to a list of players + * Promises to compress the given batch buffer using the selected compressor, optionally on a separate thread. + * + * If the buffer is smaller than the batch-threshold (usually 256), the buffer will be compressed at level 0 if supported + * by the compressor. This means that the payload will be wrapped with the appropriate header and footer, but not + * actually compressed. + * + * If the buffer is larger than the async-compression-threshold (usually 10,000), the buffer may be compressed in + * a separate thread (if available). * * @param bool|null $sync Compression on the main thread (true) or workers (false). Default is automatic (null). */