Update to latest NBT lib version

This commit is contained in:
Dylan K. Taylor
2018-10-23 16:47:00 +01:00
parent a49abff099
commit 011b9ae159
10 changed files with 23 additions and 43 deletions

View File

@ -65,12 +65,7 @@ class Item implements ItemIds, \JsonSerializable{
self::$cachedParser = new LittleEndianNBTStream();
}
$data = self::$cachedParser->read($tag);
if(!($data instanceof CompoundTag)){
throw new \InvalidArgumentException("Invalid item NBT string given, it could not be deserialized");
}
return $data;
return self::$cachedParser->read($tag);
}
private static function writeCompoundTag(CompoundTag $tag) : string{