From b5777265329753b74dd40bb105eedabeefb98724 Mon Sep 17 00:00:00 2001
From: "Dylan K. Taylor" <odigiman@gmail.com>
Date: Sun, 1 Dec 2019 08:20:26 +0000
Subject: [PATCH] NBTStream: fixed asymmetrical read/write behaviour with
 non-compound roots nobody noticed this because it has never appeared before,
 but here we are ...

---
 src/NBTStream.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/NBTStream.php b/src/NBTStream.php
index 413308a..3253b23 100644
--- a/src/NBTStream.php
+++ b/src/NBTStream.php
@@ -149,7 +149,7 @@ public function write($data){
 		$this->offset = 0;
 		$this->buffer = "";
 
-		if($data instanceof CompoundTag){
+		if($data instanceof NamedTag){
 			$this->writeTag($data);
 
 			return $this->buffer;