mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
rail connection is enabled by default + some tweaks
This commit is contained in:
parent
8e5d2bb1c7
commit
ba85d69149
5 changed files with 50 additions and 22 deletions
|
|
@ -5,18 +5,7 @@ class PoweredRailBlock extends RailBaseBlock{
|
|||
parent::__construct(POWERED_RAIL, 0, "PoweredRailBlock");
|
||||
$this->hardness = 0.7;
|
||||
$this->isFullBlock = false;
|
||||
$this->isSolid = true;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->getID() === AIR){ //Replace with common break method TODO change meta on break
|
||||
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;
|
||||
$this->isSolid = false;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue