mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +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
|
||||
$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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user