mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
NetworkBinaryStream: simplify read of canPlaceOn and canDestroy lists
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user