mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
commit
3fcf6372e0
2
.github/workflows/draft-release.yml
vendored
2
.github/workflows/draft-release.yml
vendored
@ -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
|
||||
|
||||
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -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
|
@ -53,7 +53,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
40
composer.lock
generated
@ -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": "940fa92ddd657ea8f093234660bf7be5",
|
||||
"content-hash": "1e967ff64cee3cae84242cc3e5a51752",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -275,16 +275,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": {
|
||||
@ -298,7 +298,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"
|
||||
@ -316,9 +316,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",
|
||||
@ -1425,16 +1425,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": {
|
||||
@ -1475,9 +1475,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",
|
||||
@ -1819,16 +1819,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": {
|
||||
@ -1854,7 +1854,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": [
|
||||
{
|
||||
@ -1874,7 +1874,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-05-24T09:05:09+00:00"
|
||||
"time": "2022-06-01T13:43:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
|
@ -775,7 +775,7 @@ abstract class Living extends Entity{
|
||||
$id = $block->getId();
|
||||
|
||||
if($transparent === null){
|
||||
if($id !== 0){
|
||||
if($id !== BlockLegacyIds::AIR){
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
|
@ -677,7 +677,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"));
|
||||
|
@ -37,6 +37,7 @@ use pocketmine\item\Durable;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\item\ItemIds;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\nbt\NbtException;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\IntTag;
|
||||
@ -126,7 +127,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());
|
||||
@ -202,7 +203,7 @@ class TypeConverter{
|
||||
*/
|
||||
public function netItemStackToCore(ItemStack $itemStack) : Item{
|
||||
if($itemStack->getId() === 0){
|
||||
return ItemFactory::getInstance()->get(ItemIds::AIR, 0, 0);
|
||||
return VanillaItems::AIR();
|
||||
}
|
||||
$compound = $itemStack->getNbt();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user