mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
This commit is contained in:
parent
95be571481
commit
d011fc518e
@ -143,10 +143,7 @@ abstract class Door extends Transparent{
|
|||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
public function onNearbyBlockChange() : void{
|
||||||
if($this->getSide(Facing::DOWN)->getId() === self::AIR){ //Replace with common break method
|
if($this->getSide(Facing::DOWN)->getId() === self::AIR){ //Replace with common break method
|
||||||
$this->getLevel()->setBlock($this, BlockFactory::get(Block::AIR));
|
$this->getLevel()->useBreakOn($this); //this will delete both halves if they exist
|
||||||
if($this->getSide(Facing::UP) instanceof Door){
|
|
||||||
$this->getLevel()->setBlock($this->getSide(Facing::UP), BlockFactory::get(Block::AIR));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user