mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Level: Remove obsolete \$direct parameter from setBlock()
this parameter was previously used to send blocks with a different set of flags, immediately, to players. However, the flags have been demonstrated useless and the direct sending is pointless now since packets are buffered now per session, so we might as well take advantage of the batched block update sending.
This commit is contained in:
@ -96,11 +96,11 @@ class Bed extends Transparent{
|
||||
|
||||
public function setOccupied(bool $occupied = true){
|
||||
$this->occupied = $occupied;
|
||||
$this->level->setBlock($this, $this, false, false);
|
||||
$this->level->setBlock($this, $this, false);
|
||||
|
||||
if(($other = $this->getOtherHalf()) !== null){
|
||||
$other->occupied = $occupied;
|
||||
$this->level->setBlock($other, $other, false, false);
|
||||
$this->level->setBlock($other, $other, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ class Bed extends Transparent{
|
||||
parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player);
|
||||
$nextState = clone $this;
|
||||
$nextState->head = true;
|
||||
$this->getLevel()->setBlock($next, $nextState, true, true);
|
||||
$this->getLevel()->setBlock($next, $nextState);
|
||||
|
||||
Tile::createTile(Tile::BED, $this->getLevel(), TileBed::createNBT($this, $face, $item, $player));
|
||||
Tile::createTile(Tile::BED, $this->getLevel(), TileBed::createNBT($next, $face, $item, $player));
|
||||
|
Reference in New Issue
Block a user