writeTag() публичный Метод

public writeTag ( Tag $tag )
$tag pocketmine\nbt\tag\Tag
Пример #1
0
 public function write(NBT $nbt)
 {
     foreach ($this as $tag) {
         if ($tag instanceof Tag and !$tag instanceof End) {
             $nbt->writeTag($tag);
         }
     }
     $nbt->writeTag(new End());
 }
Пример #2
0
 public function write(NBT $nbt, bool $network = false)
 {
     foreach ($this as $tag) {
         if ($tag instanceof Tag and !$tag instanceof EndTag) {
             $nbt->writeTag($tag, $network);
         }
     }
     $nbt->writeTag(new EndTag(), $network);
 }