mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 21:59:52 +00:00
Merge commit '60b26a7ea8939a85db9af0a99dd5a4b13e1a562d'
# Conflicts: # resources/vanilla # src/network/mcpe/protocol/serializer/PacketSerializer.php
This commit is contained in:
commit
05bd92a94b
@ -222,9 +222,9 @@ class PacketSerializer extends BinaryStream{
|
||||
/** @var CompoundTag|null $compound */
|
||||
$compound = null;
|
||||
if($nbtLen === 0xffff){
|
||||
$c = $this->getByte();
|
||||
if($c !== 1){
|
||||
throw new PacketDecodeException("Unexpected NBT count $c");
|
||||
$nbtDataVersion = $this->getByte();
|
||||
if($nbtDataVersion !== 1){
|
||||
throw new PacketDecodeException("Unexpected NBT data version $nbtDataVersion");
|
||||
}
|
||||
$compound = $this->getNbtCompoundRoot();
|
||||
}elseif($nbtLen !== 0){
|
||||
@ -263,7 +263,7 @@ class PacketSerializer extends BinaryStream{
|
||||
$nbt = $item->getNbt();
|
||||
if($nbt !== null){
|
||||
$this->putLShort(0xffff);
|
||||
$this->putByte(1); //TODO: some kind of count field? always 1 as of 1.9.0
|
||||
$this->putByte(1); //TODO: NBT data version (?)
|
||||
$this->put((new NetworkNbtSerializer())->write(new TreeRoot($nbt)));
|
||||
}else{
|
||||
$this->putLShort(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user