diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..76d2d3f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..4ae0c4f --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,19 @@ +name: Auto Merge Dependabot + +on: + pull_request: + types: [assigned, opened, synchronize, reopened] +jobs: + automerge: + runs-on: ubuntu-latest + permissions: write-all + steps: + - id: automerge + name: automerge + uses: pascalgn/automerge-action@v0.15.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MERGE_DELETE_BRANCH: true + MERGE_FILTER_AUTHOR: dependabot[bot] + MERGE_LABELS: '' + MERGE_METHOD: squash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b9c5149 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: push + +jobs: + build: + name: Phar building + runs-on: ubuntu-latest + if: "contains(github.event.head_commit.message, '[Build]')" + + steps: + - name: Startup + uses: actions/checkout@v3 + - name: Setup PHP and tools + uses: shivammathur/setup-php@v2 + with: + php-version: 8.4 + - name: Install Composer dependencies + run: composer install --prefer-dist --no-interaction --no-dev + - name: Download pharbuilder-rs + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + file: pharbuilder + repo: NetherGamesMC/pharbuilder-rs + token: ${{ secrets.ng_token }} + - name: Build + run: | + echo Building... + chmod +x pharbuilder + ./pharbuilder -i . -o ./BlockLagFix.phar + echo Build completed! + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: BlockLagFix + path: BlockLagFix.phar diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 1667041..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - -jobs: - PHPStan_Analyze: - name: PHPStan Analysis - runs-on: ubuntu-latest - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v3 - - - name: Setup PHP and tools - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - tools: phpstan - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache composer dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader --ignore-platform-reqs - - - name: Run PhpStan - run: phpstan analyze --no-progress src -c phpstan.neon.dist diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..7435ca5 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,21 @@ +name: PHPStan CI + +on: push + +jobs: + phpstan: + name: PHPStan Analysis + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]')" + + steps: + - name: Startup + uses: actions/checkout@v3 + - name: Setup PHP and tools + uses: shivammathur/setup-php@v2 + with: + php-version: 8.4 + - name: Install Composer dependencies + run: composer install --prefer-dist --no-interaction --ignore-platform-reqs + - name: Run PHPStan + run: ./vendor/bin/phpstan analyze --no-progress diff --git a/composer.json b/composer.json index d944ba5..53363b8 100644 --- a/composer.json +++ b/composer.json @@ -5,36 +5,25 @@ "minimum-stability": "dev", "license": "MIT", "require": { - "pocketmine/pocketmine-mp": "^5.0.0", - "muqsit/simplepackethandler": "0.1.4" + "muqsit/simple-packet-handler": "^0.1.4" }, "require-dev": { "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-strict-rules": "^1.0", - "phpstan/extension-installer": "^1.0" + "phpstan/extension-installer": "^1.0", + "nethergamesmc/pocketmine-mp": "dev-stable" }, - "repositories": [ - { - "type": "package", - "package": { - "name": "muqsit/simplepackethandler", - "version": "0.1.4", - "autoload": { - "classmap": ["src/"] - }, - "source": { - "url": "https://github.com/javierleon9966/simplepackethandler", - "type": "git", - "reference": "patch-1" - } - } - } - ], "autoload": { "psr-0": { "JavierLeon9966\\BlockLagFix\\": "src" } }, + "replace": { + "pocketmine/pocketmine-mp": "*" + }, + "repositories": [ + { "type": "vcs", "url": "git@github.com:NetherGamesMC/PocketMine-MP.git" } + ], "config": { "allow-plugins": { "phpstan/extension-installer": true diff --git a/composer.lock b/composer.lock index 0bf62e4..1c1c6bc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,56 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "07218be7e453b8ade67a7e21e742c373", + "content-hash": "a89f74ee945161ba9015ec241d13639a", "packages": [ + { + "name": "muqsit/simple-packet-handler", + "version": "0.1.4", + "source": { + "type": "git", + "url": "https://github.com/Muqsit/SimplePacketHandler.git", + "reference": "8121eca3f21cb9912c3ac8406a11f70cf105c905" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Muqsit/SimplePacketHandler/zipball/8121eca3f21cb9912c3ac8406a11f70cf105c905", + "reference": "8121eca3f21cb9912c3ac8406a11f70cf105c905", + "shasum": "" + }, + "require": { + "pocketmine/pocketmine-mp": "^5.0.0" + }, + "type": "library", + "extra": { + "virion": { + "spec": "3.0", + "namespace-root": "muqsit\\simplepackethandler" + } + }, + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0" + ], + "authors": [ + { + "name": "Muqsit", + "email": "hackhack05@gmail.com" + } + ], + "description": "Handle specific data packets (virion for PMMP API 4.0.0)", + "support": { + "issues": "https://github.com/Muqsit/SimplePacketHandler/issues", + "source": "https://github.com/Muqsit/SimplePacketHandler/tree/0.1.4" + }, + "time": "2024-06-14T08:39:49+00:00" + } + ], + "packages-dev": [ { "name": "adhocore/json-comment", "version": "1.2.1", @@ -67,25 +115,25 @@ }, { "name": "brick/math", - "version": "0.11.0", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "5.0.0" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -105,12 +153,17 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.11.0" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { @@ -118,146 +171,460 @@ "type": "github" } ], - "time": "2023-01-15T23:15:59+00:00" + "time": "2023-11-29T23:19:16+00:00" }, { - "name": "muqsit/simplepackethandler", - "version": "0.1.4", + "name": "nethergamesmc/bedrock-data", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/javierleon9966/simplepackethandler", - "reference": "patch-1" + "url": "https://github.com/NetherGamesMC/BedrockData.git", + "reference": "c362136334a90b85a0a429ea1c558feab62e39d0" }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/NetherGamesMC/BedrockData/zipball/c362136334a90b85a0a429ea1c558feab62e39d0", + "reference": "c362136334a90b85a0a429ea1c558feab62e39d0", + "shasum": "" + }, + "default-branch": true, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "CC0-1.0" + ], + "description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP", + "support": { + "source": "https://github.com/NetherGamesMC/BedrockData/tree/master" + }, + "time": "2024-12-05T08:09:30+00:00" + }, + { + "name": "nethergamesmc/bedrock-protocol", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/NetherGamesMC/BedrockProtocol.git", + "reference": "3ad8e20283052d09d25b41f6bbc208af33c3a372" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/NetherGamesMC/BedrockProtocol/zipball/3ad8e20283052d09d25b41f6bbc208af33c3a372", + "reference": "3ad8e20283052d09d25b41f6bbc208af33c3a372", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^8.1", + "pocketmine/binaryutils": "^0.2.0", + "pocketmine/color": "^0.2.0 || ^0.3.0", + "pocketmine/math": "^0.3.0 || ^0.4.0 || ^1.0.0", + "pocketmine/nbt": "^1.0.0", + "ramsey/uuid": "^4.1" + }, + "require-dev": { + "phpstan/phpstan": "1.11.9", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.0.0", + "phpunit/phpunit": "^9.5 || ^10.0" + }, + "default-branch": true, "type": "library", "autoload": { - "classmap": [ - "src/" + "psr-4": { + "pocketmine\\network\\mcpe\\protocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", + "support": { + "source": "https://github.com/NetherGamesMC/BedrockProtocol/tree/master" + }, + "time": "2024-12-24T12:23:44+00:00" + }, + { + "name": "nethergamesmc/pocketmine-mp", + "version": "dev-stable", + "source": { + "type": "git", + "url": "https://github.com/NetherGamesMC/PocketMine-MP.git", + "reference": "8007775de295de8a27eff61738455980dc9e9d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/NetherGamesMC/PocketMine-MP/zipball/8007775de295de8a27eff61738455980dc9e9d5b", + "reference": "8007775de295de8a27eff61738455980dc9e9d5b", + "shasum": "" + }, + "require": { + "adhocore/json-comment": "~1.2.0", + "composer-runtime-api": "^2.0", + "ext-chunkutils2": "^0.3.1", + "ext-crypto": "^0.3.1", + "ext-ctype": "*", + "ext-curl": "*", + "ext-date": "*", + "ext-gmp": "*", + "ext-hash": "*", + "ext-igbinary": "^3.0.1", + "ext-json": "*", + "ext-leveldb": "^0.2.1 || ^0.3.0", + "ext-mbstring": "*", + "ext-morton": "^0.1.0", + "ext-openssl": "*", + "ext-pcre": "*", + "ext-phar": "*", + "ext-pmmpthread": "^6.1.0", + "ext-reflection": "*", + "ext-simplexml": "*", + "ext-sockets": "*", + "ext-spl": "*", + "ext-yaml": ">=2.0.0", + "ext-zip": "*", + "ext-zlib": ">=1.2.11", + "nethergamesmc/bedrock-data": "dev-master", + "nethergamesmc/bedrock-protocol": "dev-master", + "netresearch/jsonmapper": "~v5.0.0", + "php": "^8.1", + "php-64bit": "*", + "pocketmine/bedrock-block-upgrade-schema": "~5.0.0+bedrock-1.21.40", + "pocketmine/bedrock-item-upgrade-schema": "~1.14.0+bedrock-1.21.50", + "pocketmine/binaryutils": "^0.2.1", + "pocketmine/callback-validator": "^1.0.2", + "pocketmine/color": "^0.3.0", + "pocketmine/errorhandler": "^0.7.0", + "pocketmine/locale-data": "~2.22.0", + "pocketmine/log": "^0.4.0", + "pocketmine/math": "~1.0.0", + "pocketmine/nbt": "~1.0.0", + "pocketmine/raklib": "~1.1.0", + "pocketmine/raklib-ipc": "~1.0.0", + "pocketmine/snooze": "^0.5.0", + "ramsey/uuid": "~4.7.0", + "symfony/filesystem": "~6.4.0" + }, + "require-dev": { + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "^2.0.0", + "phpstan/phpstan-strict-rules": "^2.0.0", + "phpunit/phpunit": "^10.5.24" + }, + "default-branch": true, + "type": "project", + "autoload": { + "psr-4": { + "pocketmine\\": "src/" + }, + "files": [ + "src/CoreConstants.php" + ] + }, + "autoload-dev": { + "psr-4": { + "pocketmine\\": "tests/phpunit/", + "pocketmine\\phpstan\\rules\\": "tests/phpstan/rules" + } + }, + "scripts": { + "make-devtools": [ + "@php -dphar.readonly=0 tests/plugins/DevTools/src/ConsoleScript.php --make ./ --relative tests/plugins/DevTools --out plugins/DevTools.phar" + ], + "make-server": [ + "@composer install --no-dev --classmap-authoritative --ignore-platform-reqs", + "@php -dphar.readonly=0 build/server-phar.php" + ], + "update-codegen": [ + "@php build/generate-bedrockdata-path-consts.php", + "@php build/generate-biome-ids.php", + "@php build/generate-block-serializer-consts.php vendor/nethergamesmc/bedrock-data/canonical_block_states.nbt", + "@php build/generate-item-type-names.php vendor/nethergamesmc/bedrock-data/required_item_list.json", + "@php build/generate-known-translation-apis.php", + "@php build/generate-pocketmine-yml-property-consts.php", + "@php build/generate-registry-annotations.php src" ] - } + }, + "license": [ + "LGPL-3.0" + ], + "description": "A server software for Minecraft: Bedrock Edition written in PHP", + "homepage": "https://pmmp.io", + "support": { + "source": "https://github.com/NetherGamesMC/PocketMine-MP/tree/stable", + "issues": "https://github.com/NetherGamesMC/PocketMine-MP/issues" + }, + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/pocketminemp" + }, + { + "type": "custom", + "url": "https://github.com/pmmp/PocketMine-MP#donate" + } + ], + "time": "2025-01-23T01:25:25+00:00" }, { - "name": "pocketmine/bedrock-block-upgrade-schema", - "version": "3.6.0", + "name": "netresearch/jsonmapper", + "version": "v5.0.0", "source": { "type": "git", - "url": "https://github.com/pmmp/BedrockBlockUpgradeSchema.git", - "reference": "1496e275db5148cb96bdaa998115e5e31a5c1e4d" + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8c64d8d444a5d764c641ebe97e0e3bc72b25bf6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/1496e275db5148cb96bdaa998115e5e31a5c1e4d", - "reference": "1496e275db5148cb96bdaa998115e5e31a5c1e4d", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8c64d8d444a5d764c641ebe97e0e3bc72b25bf6c", + "reference": "8c64d8d444a5d764c641ebe97e0e3bc72b25bf6c", "shasum": "" }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", + "squizlabs/php_codesniffer": "~3.5" + }, "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "CC0-1.0" + "OSL-3.0" ], - "description": "Schemas describing how to upgrade saved block data in older Minecraft: Bedrock Edition world saves", + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", "support": { - "issues": "https://github.com/pmmp/BedrockBlockUpgradeSchema/issues", - "source": "https://github.com/pmmp/BedrockBlockUpgradeSchema/tree/3.6.0" + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v5.0.0" }, - "time": "2024-02-28T19:25:25+00:00" + "time": "2024-09-08T10:20:00+00:00" }, { - "name": "pocketmine/bedrock-data", - "version": "2.9.0+bedrock-1.20.70", + "name": "phpstan/extension-installer", + "version": "1.4.x-dev", "source": { "type": "git", - "url": "https://github.com/pmmp/BedrockData.git", - "reference": "10b6696b662fd80a282eff7dca6c99d321c5b9e3" + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "e7bd2bf9662c96368303a284be3f2079e204b341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/10b6696b662fd80a282eff7dca6c99d321c5b9e3", - "reference": "10b6696b662fd80a282eff7dca6c99d321c5b9e3", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/e7bd2bf9662c96368303a284be3f2079e204b341", + "reference": "e7bd2bf9662c96368303a284be3f2079e204b341", "shasum": "" }, - "type": "library", + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.12.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "default-branch": true, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "CC0-1.0" + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" ], - "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.20.70" + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.4.x" }, - "time": "2024-03-13T13:55:05+00:00" + "time": "2024-09-06T14:27:20+00:00" }, { - "name": "pocketmine/bedrock-item-upgrade-schema", - "version": "1.8.0", + "name": "phpstan/phpstan", + "version": "1.12.x-dev", "source": { "type": "git", - "url": "https://github.com/pmmp/BedrockItemUpgradeSchema.git", - "reference": "4c4dc3bbceb944c5de429b6e752ab7a15652078c" + "url": "https://github.com/phpstan/phpstan.git", + "reference": "d2e193c79458c935ce91ccb72a9ee6ee67724cee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/4c4dc3bbceb944c5de429b6e752ab7a15652078c", - "reference": "4c4dc3bbceb944c5de429b6e752ab7a15652078c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d2e193c79458c935ce91ccb72a9ee6ee67724cee", + "reference": "d2e193c79458c935ce91ccb72a9ee6ee67724cee", "shasum": "" }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "CC0-1.0" + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" ], - "description": "JSON schemas for upgrading items found in older Minecraft: Bedrock world saves", "support": { - "issues": "https://github.com/pmmp/BedrockItemUpgradeSchema/issues", - "source": "https://github.com/pmmp/BedrockItemUpgradeSchema/tree/1.8.0" + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, - "time": "2024-02-28T19:25:53+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2025-01-22T12:37:55+00:00" }, { - "name": "pocketmine/bedrock-protocol", - "version": "29.0.0+bedrock-1.20.70", + "name": "phpstan/phpstan-strict-rules", + "version": "1.6.x-dev", "source": { "type": "git", - "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "8d63f39bb2cded3d3e578fd3cf7bc769b9674857" + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "b564ca479e7e735f750aaac4935af965572a7845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/8d63f39bb2cded3d3e578fd3cf7bc769b9674857", - "reference": "8d63f39bb2cded3d3e578fd3cf7bc769b9674857", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b564ca479e7e735f750aaac4935af965572a7845", + "reference": "b564ca479e7e735f750aaac4935af965572a7845", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^8.1", - "pocketmine/binaryutils": "^0.2.0", - "pocketmine/color": "^0.2.0 || ^0.3.0", - "pocketmine/math": "^0.3.0 || ^0.4.0 || ^1.0.0", - "pocketmine/nbt": "^1.0.0", - "ramsey/uuid": "^4.1" + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.12.4" }, "require-dev": { - "phpstan/phpstan": "1.10.59", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.0.0", - "phpunit/phpunit": "^9.5 || ^10.0" + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "pocketmine\\network\\mcpe\\protocol\\": "src/" + "PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "MIT" ], - "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", + "description": "Extra strict and opinionated rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.x" + }, + "time": "2025-01-19T13:02:24+00:00" + }, + { + "name": "pocketmine/bedrock-block-upgrade-schema", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/pmmp/BedrockBlockUpgradeSchema.git", + "reference": "20dd5c11e9915bacea4fe2cf649e1d23697a6e52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/20dd5c11e9915bacea4fe2cf649e1d23697a6e52", + "reference": "20dd5c11e9915bacea4fe2cf649e1d23697a6e52", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "CC0-1.0" + ], + "description": "Schemas describing how to upgrade saved block data in older Minecraft: Bedrock Edition world saves", "support": { - "issues": "https://github.com/pmmp/BedrockProtocol/issues", - "source": "https://github.com/pmmp/BedrockProtocol/tree/29.0.0+bedrock-1.20.70" + "issues": "https://github.com/pmmp/BedrockBlockUpgradeSchema/issues", + "source": "https://github.com/pmmp/BedrockBlockUpgradeSchema/tree/5.0.0" }, - "time": "2024-03-13T14:35:54+00:00" + "time": "2024-11-03T14:13:50+00:00" + }, + { + "name": "pocketmine/bedrock-item-upgrade-schema", + "version": "1.14.0", + "source": { + "type": "git", + "url": "https://github.com/pmmp/BedrockItemUpgradeSchema.git", + "reference": "9fc7c9bbb558a017395c1cb7dd819c033ee971bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/9fc7c9bbb558a017395c1cb7dd819c033ee971bb", + "reference": "9fc7c9bbb558a017395c1cb7dd819c033ee971bb", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "CC0-1.0" + ], + "description": "JSON schemas for upgrading items found in older Minecraft: Bedrock world saves", + "support": { + "issues": "https://github.com/pmmp/BedrockItemUpgradeSchema/issues", + "source": "https://github.com/pmmp/BedrockItemUpgradeSchema/tree/1.14.0" + }, + "time": "2024-12-04T12:22:49+00:00" }, { "name": "pocketmine/binaryutils", @@ -391,25 +758,25 @@ }, { "name": "pocketmine/errorhandler", - "version": "0.6.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/pmmp/ErrorHandler.git", - "reference": "dae214a04348b911e8219ebf125ff1c5589cc878" + "reference": "cae94884368a74ece5294b9ff7fef18732dcd921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/ErrorHandler/zipball/dae214a04348b911e8219ebf125ff1c5589cc878", - "reference": "dae214a04348b911e8219ebf125ff1c5589cc878", + "url": "https://api.github.com/repos/pmmp/ErrorHandler/zipball/cae94884368a74ece5294b9ff7fef18732dcd921", + "reference": "cae94884368a74ece5294b9ff7fef18732dcd921", "shasum": "" }, "require": { "php": "^8.0" }, "require-dev": { - "phpstan/phpstan": "0.12.99", - "phpstan/phpstan-strict-rules": "^0.12.2", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan": "~1.10.3", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0" }, "type": "library", "autoload": { @@ -424,22 +791,22 @@ "description": "Utilities to handle nasty PHP E_* errors in a usable way", "support": { "issues": "https://github.com/pmmp/ErrorHandler/issues", - "source": "https://github.com/pmmp/ErrorHandler/tree/0.6.0" + "source": "https://github.com/pmmp/ErrorHandler/tree/0.7.0" }, - "time": "2022-01-08T21:05:46+00:00" + "time": "2024-04-02T18:29:54+00:00" }, { "name": "pocketmine/locale-data", - "version": "2.19.6", + "version": "2.22.1", "source": { "type": "git", "url": "https://github.com/pmmp/Language.git", - "reference": "93e473e20e7f4515ecf45c5ef0f9155b9247a86e" + "reference": "fa4e377c437391cfcfdedd08eea3a848eabd1b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Language/zipball/93e473e20e7f4515ecf45c5ef0f9155b9247a86e", - "reference": "93e473e20e7f4515ecf45c5ef0f9155b9247a86e", + "url": "https://api.github.com/repos/pmmp/Language/zipball/fa4e377c437391cfcfdedd08eea3a848eabd1b49", + "reference": "fa4e377c437391cfcfdedd08eea3a848eabd1b49", "shasum": "" }, "type": "library", @@ -447,9 +814,9 @@ "description": "Language resources used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/Language/issues", - "source": "https://github.com/pmmp/Language/tree/2.19.6" + "source": "https://github.com/pmmp/Language/tree/2.22.1" }, - "time": "2023-08-08T16:53:23+00:00" + "time": "2024-12-06T14:44:17+00:00" }, { "name": "pocketmine/log", @@ -531,226 +898,74 @@ "issues": "https://github.com/pmmp/Math/issues", "source": "https://github.com/pmmp/Math/tree/1.0.0" }, - "time": "2023-08-03T12:56:33+00:00" - }, - { - "name": "pocketmine/nbt", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/pmmp/NBT.git", - "reference": "20540271cb59e04672cb163dca73366f207974f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pmmp/NBT/zipball/20540271cb59e04672cb163dca73366f207974f1", - "reference": "20540271cb59e04672cb163dca73366f207974f1", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "php-64bit": "*", - "pocketmine/binaryutils": "^0.2.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "1.10.25", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "pocketmine\\nbt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "description": "PHP library for working with Named Binary Tags", - "support": { - "issues": "https://github.com/pmmp/NBT/issues", - "source": "https://github.com/pmmp/NBT/tree/1.0.0" - }, - "time": "2023-07-14T13:01:49+00:00" - }, - { - "name": "pocketmine/netresearch-jsonmapper", - "version": "v4.4.999", - "source": { - "type": "git", - "url": "https://github.com/pmmp/netresearch-jsonmapper.git", - "reference": "9a6610033d56e358e86a3e4fd5f87063c7318833" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pmmp/netresearch-jsonmapper/zipball/9a6610033d56e358e86a3e4fd5f87063c7318833", - "reference": "9a6610033d56e358e86a3e4fd5f87063c7318833", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "replace": { - "netresearch/jsonmapper": "~4.2.0" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Fork of netresearch/jsonmapper with security fixes needed by pocketmine/pocketmine-mp", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/pmmp/netresearch-jsonmapper/tree/v4.4.999" - }, - "time": "2024-02-23T13:17:01+00:00" + "time": "2023-08-03T12:56:33+00:00" }, { - "name": "pocketmine/pocketmine-mp", - "version": "5.13.0", + "name": "pocketmine/nbt", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/pmmp/PocketMine-MP.git", - "reference": "f193a990b0bae8892637cb7fb2bdf862c8a1a759" + "url": "https://github.com/pmmp/NBT.git", + "reference": "53db37487bc5ddbfbd84247966e1a073bdcfdb7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/PocketMine-MP/zipball/f193a990b0bae8892637cb7fb2bdf862c8a1a759", - "reference": "f193a990b0bae8892637cb7fb2bdf862c8a1a759", + "url": "https://api.github.com/repos/pmmp/NBT/zipball/53db37487bc5ddbfbd84247966e1a073bdcfdb7d", + "reference": "53db37487bc5ddbfbd84247966e1a073bdcfdb7d", "shasum": "" }, "require": { - "adhocore/json-comment": "~1.2.0", - "composer-runtime-api": "^2.0", - "ext-chunkutils2": "^0.3.1", - "ext-crypto": "^0.3.1", - "ext-ctype": "*", - "ext-curl": "*", - "ext-date": "*", - "ext-gmp": "*", - "ext-hash": "*", - "ext-igbinary": "^3.0.1", - "ext-json": "*", - "ext-leveldb": "^0.2.1 || ^0.3.0", - "ext-mbstring": "*", - "ext-morton": "^0.1.0", - "ext-openssl": "*", - "ext-pcre": "*", - "ext-phar": "*", - "ext-pmmpthread": "^6.0.7", - "ext-reflection": "*", - "ext-simplexml": "*", - "ext-sockets": "*", - "ext-spl": "*", - "ext-yaml": ">=2.0.0", - "ext-zip": "*", - "ext-zlib": ">=1.2.11", - "php": "^8.1", + "php": "^7.4 || ^8.0", "php-64bit": "*", - "pocketmine/bedrock-block-upgrade-schema": "~3.6.0+bedrock-1.20.70", - "pocketmine/bedrock-data": "~2.9.0+bedrock-1.20.70", - "pocketmine/bedrock-item-upgrade-schema": "~1.8.0+bedrock-1.20.70", - "pocketmine/bedrock-protocol": "~29.0.0+bedrock-1.20.70", - "pocketmine/binaryutils": "^0.2.1", - "pocketmine/callback-validator": "^1.0.2", - "pocketmine/color": "^0.3.0", - "pocketmine/errorhandler": "^0.6.0", - "pocketmine/locale-data": "~2.19.0", - "pocketmine/log": "^0.4.0", - "pocketmine/math": "~1.0.0", - "pocketmine/nbt": "~1.0.0", - "pocketmine/netresearch-jsonmapper": "~v4.4.999", - "pocketmine/raklib": "^0.15.0", - "pocketmine/raklib-ipc": "^0.2.0", - "pocketmine/snooze": "^0.5.0", - "ramsey/uuid": "~4.7.0", - "symfony/filesystem": "~6.4.0" + "pocketmine/binaryutils": "^0.2.0" }, "require-dev": { - "phpstan/phpstan": "1.10.60", - "phpstan/phpstan-phpunit": "^1.1.0", - "phpstan/phpstan-strict-rules": "^1.2.0", - "phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "2.1.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.5" }, - "type": "project", + "type": "library", "autoload": { - "files": [ - "src/CoreConstants.php" - ], "psr-4": { - "pocketmine\\": "src/" + "pocketmine\\nbt\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0" ], - "description": "A server software for Minecraft: Bedrock Edition written in PHP", - "homepage": "https://pmmp.io", + "description": "PHP library for working with Named Binary Tags", "support": { - "issues": "https://github.com/pmmp/PocketMine-MP/issues", - "source": "https://github.com/pmmp/PocketMine-MP/tree/5.13.0" + "issues": "https://github.com/pmmp/NBT/issues", + "source": "https://github.com/pmmp/NBT/tree/1.0.1" }, - "funding": [ - { - "url": "https://github.com/pmmp/PocketMine-MP#donate", - "type": "custom" - }, - { - "url": "https://www.patreon.com/pocketminemp", - "type": "patreon" - } - ], - "time": "2024-03-13T14:59:21+00:00" + "time": "2025-01-07T22:47:46+00:00" }, { "name": "pocketmine/raklib", - "version": "0.15.1", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/pmmp/RakLib.git", - "reference": "79b7b4d1d7516dc6e322514453645ad9452b20ca" + "reference": "be2783be516bf6e2872ff5c81fb9048596617b97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLib/zipball/79b7b4d1d7516dc6e322514453645ad9452b20ca", - "reference": "79b7b4d1d7516dc6e322514453645ad9452b20ca", + "url": "https://api.github.com/repos/pmmp/RakLib/zipball/be2783be516bf6e2872ff5c81fb9048596617b97", + "reference": "be2783be516bf6e2872ff5c81fb9048596617b97", "shasum": "" }, "require": { "ext-sockets": "*", - "php": "^8.0", + "php": "^8.1", "php-64bit": "*", "php-ipv6": "*", "pocketmine/binaryutils": "^0.2.0", "pocketmine/log": "^0.3.0 || ^0.4.0" }, "require-dev": { - "phpstan/phpstan": "1.9.17", + "phpstan/phpstan": "1.10.1", "phpstan/phpstan-strict-rules": "^1.0" }, "type": "library", @@ -766,32 +981,32 @@ "description": "A RakNet server implementation written in PHP", "support": { "issues": "https://github.com/pmmp/RakLib/issues", - "source": "https://github.com/pmmp/RakLib/tree/0.15.1" + "source": "https://github.com/pmmp/RakLib/tree/1.1.1" }, - "time": "2023-03-07T15:10:34+00:00" + "time": "2024-03-04T14:02:14+00:00" }, { "name": "pocketmine/raklib-ipc", - "version": "0.2.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/pmmp/RakLibIpc.git", - "reference": "26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c" + "reference": "ce632ef2c6743e71eddb5dc329c49af6555f90bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLibIpc/zipball/26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c", - "reference": "26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c", + "url": "https://api.github.com/repos/pmmp/RakLibIpc/zipball/ce632ef2c6743e71eddb5dc329c49af6555f90bc", + "reference": "ce632ef2c6743e71eddb5dc329c49af6555f90bc", "shasum": "" }, "require": { "php": "^8.0", "php-64bit": "*", "pocketmine/binaryutils": "^0.2.0", - "pocketmine/raklib": "^0.15.0" + "pocketmine/raklib": "^0.15.0 || ^1.0.0" }, "require-dev": { - "phpstan/phpstan": "1.9.17", + "phpstan/phpstan": "1.10.1", "phpstan/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -807,9 +1022,9 @@ "description": "Channel-based protocols for inter-thread/inter-process communication with RakLib", "support": { "issues": "https://github.com/pmmp/RakLibIpc/issues", - "source": "https://github.com/pmmp/RakLibIpc/tree/0.2.0" + "source": "https://github.com/pmmp/RakLibIpc/tree/1.0.1" }, - "time": "2023-02-13T13:40:40+00:00" + "time": "2024-03-01T15:55:05+00:00" }, { "name": "pocketmine/snooze", @@ -942,20 +1157,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -1018,7 +1233,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -1030,7 +1245,7 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "symfony/filesystem", @@ -1038,19 +1253,21 @@ "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4" + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/78dde75f8f6dbbca4ec436a4b0087f7af02076d4", - "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", "shasum": "" }, "require": { "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/process": "^5.4|^6.4" + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" }, "type": "library", "autoload": { @@ -1094,7 +1311,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1102,16 +1319,16 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c9e59dec962d38cf2e0e4c61c4a1a1312f4dd7fe" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c9e59dec962d38cf2e0e4c61c4a1a1312f4dd7fe", - "reference": "c9e59dec962d38cf2e0e4c61c4a1a1312f4dd7fe", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -1123,8 +1340,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1158,7 +1375,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/1.x" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -1174,24 +1391,24 @@ "type": "tidelift" } ], - "time": "2024-04-19T06:31:17+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "1.x-dev", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e642fbe7a7b73cdb05460555289a9057bfd6ead6" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e642fbe7a7b73cdb05460555289a9057bfd6ead6", - "reference": "e642fbe7a7b73cdb05460555289a9057bfd6ead6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -1199,12 +1416,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "default-branch": true, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1239,68 +1455,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/1.x" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-19T06:31:17+00:00" - }, - { - "name": "symfony/process", - "version": "6.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cdb1c81c145fd5aa9b0038bab694035020943381", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/6.4" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -1316,167 +1471,14 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" - } - ], - "packages-dev": [ - { - "name": "phpstan/extension-installer", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", - "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0" - }, - "require-dev": { - "composer/composer": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPStan\\ExtensionInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Composer plugin for automatic installation of PHPStan extensions", - "support": { - "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" - }, - "time": "2023-05-24T08:59:17+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.11.x-dev", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "86f16901a283cb11eafe6a320d6432f6c1c78b9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/86f16901a283cb11eafe6a320d6432f6c1c78b9c", - "reference": "86f16901a283cb11eafe6a320d6432f6c1c78b9c", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "default-branch": true, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - } - ], - "time": "2024-04-25T07:30:07+00:00" - }, - { - "name": "phpstan/phpstan-strict-rules", - "version": "1.6.x-dev", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "363f921dd8441777d4fc137deb99beb486c77df1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/363f921dd8441777d4fc137deb99beb486c77df1", - "reference": "363f921dd8441777d4fc137deb99beb486c77df1", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.11" - }, - "require-dev": { - "nikic/php-parser": "^4.13.0", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" - }, - "default-branch": true, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Extra strict and opinionated rules for PHPStan", - "support": { - "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.x" - }, - "time": "2024-04-20T06:37:51+00:00" + "time": "2024-09-09T11:45:10+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "nethergamesmc/pocketmine-mp": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c158993..e436d29 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,3 +2,5 @@ parameters: level: 9 paths: - src + scanDirectories: + - vendor \ No newline at end of file diff --git a/src/JavierLeon9966/BlockLagFix/BlockLagFix.php b/src/JavierLeon9966/BlockLagFix/BlockLagFix.php index 19abd57..e464d39 100644 --- a/src/JavierLeon9966/BlockLagFix/BlockLagFix.php +++ b/src/JavierLeon9966/BlockLagFix/BlockLagFix.php @@ -21,6 +21,9 @@ use pocketmine\player\Player; use pocketmine\plugin\PluginBase; use pocketmine\world\World; +use function dirname; + +require_once(dirname(__FILE__, 4) . '/vendor/autoload.php'); final class BlockLagFix extends PluginBase{ @@ -56,7 +59,7 @@ public function onEnable(): void{ if(!isset($this->oldBlocksFullId[$blockHash])){ return true; } - if(TypeConverter::getInstance()->getBlockTranslator()->internalIdToNetworkId($this->oldBlocksFullId[$blockHash]) !== $packet->blockRuntimeId){ + if(TypeConverter::getInstance($target->getProtocolId())->getBlockTranslator()->internalIdToNetworkId($this->oldBlocksFullId[$blockHash]) !== $packet->blockRuntimeId){ return true; } unset($this->oldBlocksFullId[$blockHash]); @@ -90,17 +93,18 @@ public function onEnable(): void{ return; } $this->lastPlayer = $event->getPlayer(); + $typeConverter = $event->getPlayer()->getNetworkSession()->getTypeConverter(); $clickedBlock = $event->getBlock(); $replaceBlock = $clickedBlock->getSide($event->getFace()); $this->oldBlocksFullId = []; $this->oldTilesSerializedCompound = []; - $saveOldBlock = function(Block $block): void{ + $saveOldBlock = function(Block $block) use ($typeConverter): void{ $pos = $block->getPosition(); $posIndex = World::blockHash($pos->getFloorX(), $pos->getFloorY(), $pos->getFloorZ()); $this->oldBlocksFullId[$posIndex] = $block->getStateId(); $tile = $pos->getWorld()->getTileAt($pos->getFloorX(), $pos->getFloorY(), $pos->getFloorZ()); if($tile instanceof Spawnable){ - $this->oldTilesSerializedCompound[$posIndex] = $tile->getSerializedSpawnCompound(); + $this->oldTilesSerializedCompound[$posIndex] = $tile->getSerializedSpawnCompound($typeConverter); } }; foreach($clickedBlock->getAllSides() as $block){