From aa713c4e4a19ed43fdfb2f26c7bf5120ba42d07c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 27 Nov 2016 12:17:11 +0000 Subject: [PATCH] Added ability to specify tag name for serializing --- src/pocketmine/item/Item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index c04ffad4d..02f74ed83 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -778,8 +778,8 @@ class Item implements ItemIds, \JsonSerializable{ * * @return CompoundTag */ - public function nbtSerialize(int $slot = -1) : CompoundTag{ - $tag = new CompoundTag(null, [ + public function nbtSerialize(int $slot = -1, string $tagName = "") : CompoundTag{ + $tag = new CompoundTag($tagName, [ "id" => new ShortTag("id", $this->id), "Count" => new ByteTag("Count", $this->count ?? -1), "Damage" => new ShortTag("Damage", $this->meta),