Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'

# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/lang/Language.php
#	src/network/mcpe/protocol/AddItemActorPacket.php
#	src/network/mcpe/protocol/AddPlayerPacket.php
#	src/network/mcpe/protocol/SetActorDataPacket.php
#	src/network/mcpe/serializer/NetworkBinaryStream.php
#	src/permission/Permission.php
#	src/pocketmine/block/Leaves.php
#	src/pocketmine/entity/DataPropertyManager.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/item/Banner.php
#	src/pocketmine/item/Item.php
#	src/pocketmine/level/format/io/LevelProvider.php
#	src/pocketmine/level/format/io/LevelProviderManager.php
#	src/pocketmine/network/mcpe/protocol/AddActorPacket.php
#	src/pocketmine/network/mcpe/protocol/LoginPacket.php
#	src/pocketmine/tile/Banner.php
#	src/scheduler/BulkCurlTask.php
#	src/updater/AutoUpdater.php
#	src/utils/Config.php
#	src/utils/Utils.php
#	src/world/generator/Flat.php
#	src/world/generator/Generator.php
This commit is contained in:
Dylan K. Taylor
2020-01-31 21:07:34 +00:00
39 changed files with 164 additions and 25 deletions

View File

@@ -575,6 +575,7 @@ class Item implements \JsonSerializable{
* Returns an array of item stack properties that can be serialized to json.
*
* @return mixed[]
* @phpstan-return array{id: int, damage?: int, count?: int, nbt_b64?: string}
*/
final public function jsonSerialize() : array{
$data = [
@@ -599,6 +600,14 @@ class Item implements \JsonSerializable{
/**
* Returns an Item from properties created in an array by {@link Item#jsonSerialize}
* @param mixed[] $data
* @phpstan-param array{
* id: int,
* damage?: int,
* count?: int,
* nbt?: string,
* nbt_hex?: string,
* nbt_b64?: string
* } $data
*
* @throws NbtDataException
* @throws \InvalidArgumentException