We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83e59f4 commit 65eabcfCopy full SHA for 65eabcf
src/Tag/Tag.php
@@ -140,6 +140,9 @@ public function write(Writer $writer): Tag
140
if(!($this instanceof CompoundTag) && !(in_array($writer->getFormat(), [NbtFormat::BEDROCK_EDITION_NETWORK, NbtFormat::BEDROCK_EDITION]) && $this instanceof ListTag)){
141
throw new Exception("NBT files must start with a CompoundTag (or ListTag for Minecraft Bedrock Edition)");
142
}
143
+ if($this->getName() === null) {
144
+ $this->setName("");
145
+ }
146
$writer->write($this->serialize($writer->getSerializer()));
147
return $this;
148
0 commit comments