mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Door Placement, Breaking and Activation
This commit is contained in:
parent
9cdd616852
commit
a5651c0f43
7 changed files with 117 additions and 87 deletions
|
|
@ -38,6 +38,14 @@ class GenericBlock extends Block{
|
|||
return false;
|
||||
}
|
||||
|
||||
public function onBreak(BlockAPI $level, Item $item, Player $player){
|
||||
if($this->inWorld === true){
|
||||
$level->setBlock($this, 0, 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onUpdate(BlockAPI $level, $type){
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue