示例#1
0
 public function read(NBT $nbt)
 {
     $this->value = [];
     do {
         $tag = $nbt->readTag();
         if ($tag instanceof NamedTag and $tag->getName() !== "") {
             $this->{$tag->getName()} = $tag;
         }
     } while (!$tag instanceof End and !$nbt->feof());
 }