diff --git a/src/material/block/nonfull/IronDoor.php b/src/material/block/nonfull/IronDoor.php index d8d41ec8..328cde7d 100644 --- a/src/material/block/nonfull/IronDoor.php +++ b/src/material/block/nonfull/IronDoor.php @@ -46,6 +46,17 @@ class IronDoorBlock extends DoorBlock{ } } + public function onUpdate($type){ + if($type === BLOCK_UPDATE_NORMAL){ + if($this->getSide(0)->getID() === AIR){ //Replace with common break method + ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem($this->id, $this->meta, 1)); + $this->level->setBlock($this, new AirBlock(), true, false, true); + return BLOCK_UPDATE_NORMAL; + } + } + return false; + } + public function getDrops(Item $item, Player $player){ if($item->isPickaxe() >= 1){ return array( @@ -55,4 +66,4 @@ class IronDoorBlock extends DoorBlock{ return array(); } } -} \ No newline at end of file +}