mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Removed some useless code
This commit is contained in:
parent
a5a8732800
commit
6e4b8ba677
@ -272,12 +272,7 @@ abstract class Door extends Transparent{
|
|||||||
$down = $this->getSide(0);
|
$down = $this->getSide(0);
|
||||||
if($down->getId() === $this->getId()){
|
if($down->getId() === $this->getId()){
|
||||||
$meta = $down->getDamage() ^ 0x04;
|
$meta = $down->getDamage() ^ 0x04;
|
||||||
$this->getLevel()->setBlock($down, Block::get($this->getId(), $meta), true);
|
$this->level->setBlock($down, Block::get($this->getId(), $meta), true);
|
||||||
$players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4);
|
|
||||||
if($player instanceof Player){
|
|
||||||
unset($players[$player->getLoaderId()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->level->addSound(new DoorSound($this));
|
$this->level->addSound(new DoorSound($this));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -285,11 +280,7 @@ abstract class Door extends Transparent{
|
|||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
$this->meta ^= 0x04;
|
$this->meta ^= 0x04;
|
||||||
$this->getLevel()->setBlock($this, $this, true);
|
$this->level->setBlock($this, $this, true);
|
||||||
$players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4);
|
|
||||||
if($player instanceof Player){
|
|
||||||
unset($players[$player->getLoaderId()]);
|
|
||||||
}
|
|
||||||
$this->level->addSound(new DoorSound($this));
|
$this->level->addSound(new DoorSound($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user