Merge branch 'next-major' into modern-world-support

This commit is contained in:
Dylan K. Taylor 2022-06-01 15:34:26 +01:00
commit ef15dc883a
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
9 changed files with 28 additions and 28 deletions

View File

@ -18,7 +18,7 @@ jobs:
submodules: true
- name: Setup PHP
uses: shivammathur/setup-php@2.18.1
uses: shivammathur/setup-php@2.19.0
with:
php-version: 8.0

View File

@ -195,7 +195,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup PHP and tools
uses: shivammathur/setup-php@2.18.1
uses: shivammathur/setup-php@2.19.0
with:
php-version: 8.0
tools: php-cs-fixer:3.2

@ -1 +1 @@
Subproject commit 8138c6a4a4a5b38047b9a5043c5aa0cefc32ee71
Subproject commit 11103498ca761be83598f9759cc7196c167fcb7e

View File

@ -54,7 +54,7 @@
"webmozart/path-util": "^2.3"
},
"require-dev": {
"phpstan/phpstan": "1.7.1",
"phpstan/phpstan": "1.7.8",
"phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "^9.2"

40
composer.lock generated
View File

@ -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": "17e7814a247ffefd8c9cee9530263eb4",
"content-hash": "2132dbc0482fe77716eee2cfec934e20",
"packages": [
{
"name": "adhocore/json-comment",
@ -302,16 +302,16 @@
},
{
"name": "pocketmine/bedrock-protocol",
"version": "9.0.1+bedrock-1.18.30",
"version": "9.0.2+bedrock-1.18.30",
"source": {
"type": "git",
"url": "https://github.com/pmmp/BedrockProtocol.git",
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e"
"reference": "37f1cd017caf7aaaa90330ee54690098283589cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/37f1cd017caf7aaaa90330ee54690098283589cb",
"reference": "37f1cd017caf7aaaa90330ee54690098283589cb",
"shasum": ""
},
"require": {
@ -325,7 +325,7 @@
"ramsey/uuid": "^4.1"
},
"require-dev": {
"phpstan/phpstan": "1.5.7",
"phpstan/phpstan": "1.7.4",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^9.5"
@ -343,9 +343,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/9.0.1+bedrock-1.18.30"
"source": "https://github.com/pmmp/BedrockProtocol/tree/9.0.2+bedrock-1.18.30"
},
"time": "2022-04-23T14:48:16+00:00"
"time": "2022-05-30T15:09:53+00:00"
},
{
"name": "pocketmine/binaryutils",
@ -1452,16 +1452,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.13.2",
"version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "210577fe3cf7badcc5814d99455df46564f3c077"
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
"reference": "210577fe3cf7badcc5814d99455df46564f3c077",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"shasum": ""
},
"require": {
@ -1502,9 +1502,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
},
"time": "2021-11-30T19:35:32+00:00"
"time": "2022-05-31T20:59:12+00:00"
},
{
"name": "phar-io/manifest",
@ -1846,16 +1846,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.7.1",
"version": "1.7.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719"
"reference": "2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a",
"reference": "2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a",
"shasum": ""
},
"require": {
@ -1881,7 +1881,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.7.1"
"source": "https://github.com/phpstan/phpstan/tree/1.7.8"
},
"funding": [
{
@ -1901,7 +1901,7 @@
"type": "tidelift"
}
],
"time": "2022-05-24T09:05:09+00:00"
"time": "2022-06-01T13:43:17+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -348,7 +348,7 @@ abstract class Liquid extends Transparent{
$ev = new BlockSpreadEvent($block, $this, $new);
$ev->call();
if(!$ev->isCancelled()){
if($block->getId() > 0){
if($block->getId() !== BlockLegacyIds::AIR){
$this->position->getWorld()->useBreakOn($block->position);
}

View File

@ -775,7 +775,7 @@ abstract class Living extends Entity{
$id = $block->getId();
if($transparent === null){
if($id !== 0){
if($id !== BlockLegacyIds::AIR){
break;
}
}else{

View File

@ -682,7 +682,7 @@ class Item implements \JsonSerializable{
*/
public static function nbtDeserialize(CompoundTag $tag) : Item{
if($tag->getTag("id") === null || $tag->getTag("Count") === null){
return ItemFactory::getInstance()->get(0);
return VanillaItems::AIR();
}
$count = Binary::unsignByte($tag->getByte("Count"));

View File

@ -126,7 +126,7 @@ class TypeConverter{
public function recipeIngredientToCoreItemStack(RecipeIngredient $ingredient) : Item{
if($ingredient->getId() === 0){
return ItemFactory::getInstance()->get(ItemIds::AIR, 0, 0);
return VanillaItems::AIR();
}
[$id, $meta] = ItemTranslator::getInstance()->fromNetworkIdWithWildcardHandling($ingredient->getId(), $ingredient->getMeta());
return ItemFactory::getInstance()->get($id, $meta, $ingredient->getCount());