diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index da5dac78b3..711c9db646 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -18,7 +18,7 @@ jobs: submodules: true - name: Setup PHP - uses: shivammathur/setup-php@2.19.0 + uses: shivammathur/setup-php@2.20.0 with: php-version: 8.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 308e22fa40..63c80100e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -198,7 +198,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup PHP and tools - uses: shivammathur/setup-php@2.19.0 + uses: shivammathur/setup-php@2.20.0 with: php-version: 8.0 tools: php-cs-fixer:3.2 diff --git a/composer.json b/composer.json index 151b2c1147..672053089d 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "webmozart/path-util": "^2.3" }, "require-dev": { - "phpstan/phpstan": "1.7.15", + "phpstan/phpstan": "1.8.0", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index d946ebef06..4e2daae37f 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": "4d3d74b811713475413c03f95455c355", + "content-hash": "f4dff5c2abe600c5aa22b7b357874cb0", "packages": [ { "name": "adhocore/json-comment", @@ -739,16 +739,16 @@ }, { "name": "pocketmine/nbt", - "version": "0.3.2", + "version": "0.3.3", "source": { "type": "git", "url": "https://github.com/pmmp/NBT.git", - "reference": "3e0d9ef6b6c5fb45e3745a121296e75631b3eefe" + "reference": "f4321be50df1a18b9f4e94d428a2e68a6e2ac2b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/NBT/zipball/3e0d9ef6b6c5fb45e3745a121296e75631b3eefe", - "reference": "3e0d9ef6b6c5fb45e3745a121296e75631b3eefe", + "url": "https://api.github.com/repos/pmmp/NBT/zipball/f4321be50df1a18b9f4e94d428a2e68a6e2ac2b4", + "reference": "f4321be50df1a18b9f4e94d428a2e68a6e2ac2b4", "shasum": "" }, "require": { @@ -758,7 +758,7 @@ }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "1.2.0", + "phpstan/phpstan": "1.7.7", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5" }, @@ -775,9 +775,9 @@ "description": "PHP library for working with Named Binary Tags", "support": { "issues": "https://github.com/pmmp/NBT/issues", - "source": "https://github.com/pmmp/NBT/tree/0.3.2" + "source": "https://github.com/pmmp/NBT/tree/0.3.3" }, - "time": "2021-12-16T01:02:37+00:00" + "time": "2022-07-06T14:13:26+00:00" }, { "name": "pocketmine/raklib", @@ -1791,16 +1791,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.15", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a" + "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a", - "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b7648d4ee9321665acaf112e49da9fd93df8fbd5", + "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5", "shasum": "" }, "require": { @@ -1826,7 +1826,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.15" + "source": "https://github.com/phpstan/phpstan/tree/1.8.0" }, "funding": [ { @@ -1846,7 +1846,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T08:29:01+00:00" + "time": "2022-06-29T08:53:31+00:00" }, { "name": "phpstan/phpstan-phpunit", diff --git a/src/block/utils/FallableTrait.php b/src/block/utils/FallableTrait.php index 4461577390..95b59727c8 100644 --- a/src/block/utils/FallableTrait.php +++ b/src/block/utils/FallableTrait.php @@ -24,9 +24,6 @@ declare(strict_types=1); namespace pocketmine\block\utils; use pocketmine\block\Block; -use pocketmine\block\BlockTypeIds; -use pocketmine\block\Fire; -use pocketmine\block\Liquid; use pocketmine\block\VanillaBlocks; use pocketmine\entity\Location; use pocketmine\entity\object\FallingBlock; @@ -46,7 +43,7 @@ trait FallableTrait{ public function onNearbyBlockChange() : void{ $pos = $this->getPosition(); $down = $pos->getWorld()->getBlock($pos->getSide(Facing::DOWN)); - if($down->getTypeId() === BlockTypeIds::AIR || $down instanceof Liquid || $down instanceof Fire){ + if($down->canBeReplaced()){ $pos->getWorld()->setBlock($pos, VanillaBlocks::AIR()); $block = $this;