mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed item CompoundTags keeping the tag
name after NBT serialize/deserialize, close #1145
This commit is contained in:
@ -1059,7 +1059,9 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($tag->tag) and $tag->tag instanceof CompoundTag){
|
if(isset($tag->tag) and $tag->tag instanceof CompoundTag){
|
||||||
$item->setNamedTag($tag->tag);
|
$t = clone $tag->tag;
|
||||||
|
$t->setName("");
|
||||||
|
$item->setNamedTag($t);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
|
Reference in New Issue
Block a user