public function writeTag(Tag $tag) { $this->putByte($tag->getType()); if ($tag instanceof NamedTAG) { $this->putString($tag->getName()); } $tag->write($this); }
public function writeTag(Tag $tag, bool $network = false) { $this->putByte($tag->getType()); if ($tag instanceof NamedTAG) { $this->putString($tag->getName(), $network); } $tag->write($this, $network); }