mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Updated PocketMine-NBT dependency
This commit is contained in:
@@ -2789,9 +2789,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$t = $this->level->getTile($pos);
|
||||
if($t instanceof Spawnable){
|
||||
$nbt = new NetworkLittleEndianNBTStream();
|
||||
$nbt->read($packet->namedtag);
|
||||
$nbt = $nbt->getData();
|
||||
if(!$t->updateCompoundTag($nbt, $this)){
|
||||
$compound = $nbt->read($packet->namedtag);
|
||||
|
||||
if(!($compound instanceof CompoundTag)){
|
||||
throw new \InvalidArgumentException("Expected " . CompoundTag::class . " in block entity NBT, got " . (is_object($compound) ? get_class($compound) : gettype($compound)));
|
||||
}
|
||||
if(!$t->updateCompoundTag($compound, $this)){
|
||||
$t->spawnTo($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user