Removed some useless code

This commit is contained in:
Dylan K. Taylor 2017-02-22 11:25:31 +00:00
parent a5a8732800
commit 6e4b8ba677

View File

@ -272,12 +272,7 @@ abstract class Door extends Transparent{
$down = $this->getSide(0);
if($down->getId() === $this->getId()){
$meta = $down->getDamage() ^ 0x04;
$this->getLevel()->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->setBlock($down, Block::get($this->getId(), $meta), true);
$this->level->addSound(new DoorSound($this));
return true;
}
@ -285,11 +280,7 @@ abstract class Door extends Transparent{
return false;
}else{
$this->meta ^= 0x04;
$this->getLevel()->setBlock($this, $this, true);
$players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4);
if($player instanceof Player){
unset($players[$player->getLoaderId()]);
}
$this->level->setBlock($this, $this, true);
$this->level->addSound(new DoorSound($this));
}