pocketmine\nbt\NBT::putByte PHP Метод

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

public putByte ( $v )
    public function putByte($v)
    {
        $this->buffer .= Binary::writeByte($v);
    }

Usage Example

Пример #1
0
 public function write(NBT $nbt)
 {
     if (!isset($this->tagType)) {
         $id = null;
         foreach ($this as $tag) {
             if ($tag instanceof Tag) {
                 if (!isset($id)) {
                     $id = $tag->getType();
                 } elseif ($id !== $tag->getType()) {
                     return false;
                 }
             }
         }
         $this->tagType = $id;
     }
     $nbt->putByte($this->tagType);
     /** @var Tag[] $tags */
     $tags = [];
     foreach ($this as $tag) {
         if ($tag instanceof Tag) {
             $tags[] = $tag;
         }
     }
     $nbt->putInt(count($tags));
     foreach ($tags as $tag) {
         $tag->write($nbt);
     }
 }
All Usage Examples Of pocketmine\nbt\NBT::putByte