Fix setting custom name erases CompoundTag, fixes #244 ...

... even though this bug was introduced AFTER said issue was reported.
Nice work @Muqsit
This commit is contained in:
Dylan K. Taylor 2017-01-10 08:58:31 +00:00
parent 058468104a
commit 57f3f9b4ed

View File

@ -559,7 +559,7 @@ class Item implements ItemIds, \JsonSerializable{
$this->clearCustomName();
}
if($this->hasCompoundTag()){
if(!$this->hasCompoundTag()){
$tag = new CompoundTag("", []);
}else{
$tag = $this->getNamedTag();