mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
NetworkBinaryStream: simplify read of canPlaceOn and canDestroy lists
This commit is contained in:
parent
56328f66a7
commit
49622cc2a5
@ -84,19 +84,13 @@ class NetworkBinaryStream extends BinaryStream{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
$canPlaceOn = $this->getVarInt();
|
for($i = 0, $canPlaceOn = $this->getVarInt(); $i < $canPlaceOn; ++$i){
|
||||||
if($canPlaceOn > 0){
|
$this->getString();
|
||||||
for($i = 0; $i < $canPlaceOn; ++$i){
|
|
||||||
$this->getString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
$canDestroy = $this->getVarInt();
|
for($i = 0, $canDestroy = $this->getVarInt(); $i < $canDestroy; ++$i){
|
||||||
if($canDestroy > 0){
|
$this->getString();
|
||||||
for($i = 0; $i < $canDestroy; ++$i){
|
|
||||||
$this->getString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ItemFactory::get($id, $data, $cnt, $nbt);
|
return ItemFactory::get($id, $data, $cnt, $nbt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user