mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
SignPosts drop being without a support block
This commit is contained in:
parent
5786ba7a35
commit
ccc5e1b628
1 changed files with 11 additions and 0 deletions
|
|
@ -53,6 +53,17 @@ class SignPostBlock extends TransparentBlock{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onUpdate($type){
|
||||||
|
if($type === BLOCK_UPDATE_NORMAL){
|
||||||
|
if($this->getSide(0)->isSolid === false)){ //Replace wit common break method
|
||||||
|
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem(SIGN, 0, 1));
|
||||||
|
$this->level->setBlock($this, new AirBlock(), false);
|
||||||
|
return BLOCK_UPDATE_NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function onBreak(Item $item, Player $player){
|
public function onBreak(Item $item, Player $player){
|
||||||
$this->level->setBlock($this, new AirBlock(), true, true);
|
$this->level->setBlock($this, new AirBlock(), true, true);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue