mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Update IronDoor.php
This commit is contained in:
parent
0d53ce1889
commit
f959cf7bc3
1 changed files with 12 additions and 1 deletions
|
|
@ -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){
|
public function getDrops(Item $item, Player $player){
|
||||||
if($item->isPickaxe() >= 1){
|
if($item->isPickaxe() >= 1){
|
||||||
return array(
|
return array(
|
||||||
|
|
@ -55,4 +66,4 @@ class IronDoorBlock extends DoorBlock{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue