writeTag() public method

public writeTag ( Tag $tag )
$tag pocketmine\nbt\tag\Tag
Exemplo n.º 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());
 }
Exemplo n.º 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);
 }