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" diff --git a/build/php b/build/php index 39885cf24..9c7ea425a 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 39885cf24826773bc3a0e8134e04a2032e97f477 +Subproject commit 9c7ea425ac36941fe7f9718aecb97b3375221228 diff --git a/src/Server.php b/src/Server.php index dcadf4ce7..c490d7837 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). */ 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)); } 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{ /**