Correct Ice drop

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-20 16:38:41 +02:00
parent 47b54cfd28
commit 228075851c
3 changed files with 20 additions and 14 deletions

View file

@ -60,20 +60,19 @@ class DoorBlock extends TransparentBlock{
}
public function onBreak(Item $item, Player $player){
if(($this->meta & 0x08) === 0x08){
$down = $this->getSide(0);
if($down->getID() === $this->id){
$this->level->setBlock($down, new AirBlock());
}
}else{
$up = $this->getSide(1);
if($up->getID() === $this->id){
$this->level->setBlock($up, new AirBlock());
}
if(($this->meta & 0x08) === 0x08){
$down = $this->getSide(0);
if($down->getID() === $this->id){
$this->level->setBlock($down, new AirBlock());
}
$this->level->setBlock($this, new AirBlock());
return true;
return false;
}else{
$up = $this->getSide(1);
if($up->getID() === $this->id){
$this->level->setBlock($up, new AirBlock());
}
}
$this->level->setBlock($this, new AirBlock());
return true;
}
public function onActivate(Item $item, Player $player){