Merge branch 'release/3.2' into release/3.3

This commit is contained in:
Dylan K. Taylor 2018-10-26 20:08:55 +01:00
commit c1c56f29bb

View File

@ -109,7 +109,12 @@ class NetworkBinaryStream extends BinaryStream{
$this->putVarInt($auxValue);
$nbt = $item->getCompoundTag();
$this->putLShort(strlen($nbt));
$nbtLen = strlen($nbt);
if($nbtLen > 32767){
throw new \InvalidArgumentException("NBT encoded length must be < 32768, got $nbtLen bytes");
}
$this->putLShort($nbtLen);
$this->put($nbt);
$this->putVarInt(0); //CanPlaceOn entry count (TODO)