Updated NBT dependency

This commit is contained in:
Dylan K. Taylor
2019-03-29 19:47:15 +00:00
parent 8e9f787d33
commit f4480c07ee
3 changed files with 9 additions and 8 deletions

View File

@ -2983,7 +2983,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$t = $this->level->getTile($pos);
if($t instanceof Spawnable){
$nbt = new NetworkLittleEndianNBTStream();
$compound = $nbt->read($packet->namedtag);
$_ = 0;
$compound = $nbt->read($packet->namedtag, false, $_, 512);
if(!($compound instanceof CompoundTag)){
throw new \InvalidArgumentException("Expected " . CompoundTag::class . " in block entity NBT, got " . (is_object($compound) ? get_class($compound) : gettype($compound)));