diff --git a/src/pocketmine/network/mcpe/NetworkBinaryStream.php b/src/pocketmine/network/mcpe/NetworkBinaryStream.php index f126fe787..9b1236898 100644 --- a/src/pocketmine/network/mcpe/NetworkBinaryStream.php +++ b/src/pocketmine/network/mcpe/NetworkBinaryStream.php @@ -84,19 +84,13 @@ class NetworkBinaryStream extends BinaryStream{ } //TODO - $canPlaceOn = $this->getVarInt(); - if($canPlaceOn > 0){ - for($i = 0; $i < $canPlaceOn; ++$i){ - $this->getString(); - } + for($i = 0, $canPlaceOn = $this->getVarInt(); $i < $canPlaceOn; ++$i){ + $this->getString(); } //TODO - $canDestroy = $this->getVarInt(); - if($canDestroy > 0){ - for($i = 0; $i < $canDestroy; ++$i){ - $this->getString(); - } + for($i = 0, $canDestroy = $this->getVarInt(); $i < $canDestroy; ++$i){ + $this->getString(); } return ItemFactory::get($id, $data, $cnt, $nbt);